I want to solve two nonlinear equations in MATLAB so i did the following:
part of my script
c=[A\u;A\v];
% parts of code are omitted.
x0=[1;1];
sol= fsolve(@myfunc,x0);
the myfunc
function is as follows
function F = myfunc(x)
F=[ x(1)*c(1)+x(2)*c(2)+x(1)*x(2)*c(3)+c(4)-ii;
x(1)*c(5)+x(2)*c(6)+x(1)*x(2)*c(7)+c(8)-jj];
end
i have two unknowns x(1)
and x(2)
my question is How to pass a values(c
,ii
,jj
) to myfunc
in every time i call it?
or how to overcome this error Undefined function or method 'c' for input arguments of type 'double'.
thanks