I have an object and I want to use x = fslove(@fun,x0) as a method, where @fun is another method within the same class definition. A simplified example of my syntax is below, I am using handle classes, b and x0 are public properties.
function x = fun(obj)
x = [sin(obj.b(1)) - obj.x0(1);
cos(obj.b(2)) - obj.x0(2)];
I get an error 'too many input arguments' whenever I have an input like @obj.fun as the first argument in fsolve. Does fsolve accept methods? What do you think is causing this problem?