From: Nazanin on
Hi,
I am using Matlab optimization tool box and I want to plot
the value of the function being optimized as well as the value of its parameters.

I want all the functions to be plot so I set:
PlotFcns = {@optimplotx,@optimplotfunccount,@optimplotfval,..
@optimplotstepsize,@optimplotfirstorderopt};

My problem is when in the function "callAllOptimPlotFcns" the command

state(i) = feval(plotNames{i},x,optimvalues,'init',varargin{:});

is called, the arguments are more than what e.g. "optimplotx" or other functions in PlotFcn are allowed to have! so as a result I get the error:
??? Error using ==> optimplotx
Too many input arguments.

I would appreciate it if anyone can help me with that,

Thanks,
Nazanin