Hi,
I have defined a simple function, to solve numerically a system of 3 equeations, 3 unknows, but I keep receiving this error:
FSOLVE requires all values returned by functions to be of data type double.
Shoul I use another solver due to myt equations?
here is the code
function [L, V, SP]=steadystate_helper(L0, V0, SP0, bet, tet, chi, tau)x0=[L0; V0; SP0];F=@(L, V, SP) [L-V/(tet-bet*(V*SP)); 1-chi*(SP*L+(1/bet))+tau*L; V-chi+(1-chi)*bet*V*(SP*L+(1/bet))];options = optimset ('Display', 'Final', 'Tolx', 1e-10,'Tolfun',1e-10);[L, V, SP]=fsolve(@(L, V, SP) F, x0, options);
Best Answer