My currenct script looks like this:
function F = myfun(x) x0 = [0.1 0.2 0.3 0.4] x = x0 f1 = inline('1*(1 - x(1))+100*(-1*x(1)*x(2))'); f2 = inline('1*(2 - x(2))+100*(-1*x(1)*x(2)-1*x(2)*x(3))'); f3 = inline('1*(0 - x(3))+100*(1*x(1)*x(2)-1*x(2)*x(3))'); f4 = inline('1*(0 - x(4))+100*(1*x(2)*x(3))'); F = [f1(x);f2(x);f3(x);f4(x)] options=optimset('Display','iter'); x = fsolve(@myfun,x0);end
Still nothing seems to get this working, can anyone help me out? If i do not define my first [x] he will not run because there are not enough input arguments.
Thanks in advance!
Frenk
Best Answer