Function definitions are not permitted in this context.

  • Follow


Hi all,
May I know what is wrong with my code? When i run the code, error message 'Function definitions are not permitted in this context

function [avgmin,avgtime,avgfunevals]=bressloff_forrester
rand('state',0)
for i=1:5
tic
[x(i),fmin(i),flag,details]=fmincon(@onevar,rand,[],[],[],[],0.01,0.99);
time(i)=toc;
evals(i)=details.funcCount;
end
avgmin=mean(fmin);
avgtime=mean(time);
avgfunevals=mean(evals);

Thanks! Your help is very much appreciated! 
 
0
Reply Dong 2/11/2011 5:02:04 PM


0 Replies
559 Views

(page loaded in 0.001 seconds)

Similiar Articles:













7/21/2012 11:19:04 PM


Reply: