[Scilab-users] fminsearch, error occurs after changing variable name
Jens Simon Strom
j.s.strom at hslmg.de
Sun Dec 2 09:33:41 CET 2012
Hello Scilab experts,
This script functions:
function SAQ=!f(p), SAQ=sum( ( p(1)+p(2)*xi-yi ).^2 ), endfunction
xi=1:1000 ;
yi=2*xi+3;
popt=fminsearch(!f,[0;0])
If I replace yi by y everywhere the script functions too as expected.
If I replace xi by x everywhere an error occurs: "Inconsistent subtraction in
function !f.
What is wrong here?
Kind regards
Jens
More information about the users
mailing list