help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with inputParser and anonymous functions for validators


From: Jose
Subject: Problem with inputParser and anonymous functions for validators
Date: Fri, 21 Sep 2012 21:12:59 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0

Hello.

I am trying to use inputParser and anonymous functions for validators. I get errors, as follows.

octave:2> p = inputParser;
octave:3> val = @(x) ischar(x);
octave:4> val('hello')
ans =  1
octave:5> p = addRequired (p,"pack", @val);
error: @val: no function and no method found
error: evaluating argument list element number 3
octave:5> p = addRequired (p,"pack", @ischar);


Any hints?
I am using octave 3.6.2 and general package 1.3.2

BR
Jose


reply via email to

[Prev in Thread] Current Thread [Next in Thread]