<div dir="ltr">Hi.<div><br></div><div>fsolve solves f(x)=0 where f is your function. So you have to remove the '=0' from your function.</div><div><br></div><div>Éric.</div><div><br></div><div>PS : in a function the '=' is used to define the value of a variable in the lhs.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-27 18:11 GMT+02:00 Mathseco <span dir="ltr"><<a href="mailto:rashmi.19@gmail.com" target="_blank">rashmi.19@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I tried to write a function solve_m on my own but not getting it right and<br>
getting lot of errors...<br>
I have 8 endogenous variables i.e.w,ws,X,Y,alx,aly,asx,asy...<br>
<br>
function [w,ws,X,Y,alx,aly,asx,asy]=Solve_m(L,S,Px,Py,t,alpha,beeta,A,B)<br>
alx-(1/(A*(ws/w)*(alpha/(1-alpha)))^(alpha-1))=0;<br>
asx-1/(A*(ws/w)*(alpha/(1-alpha)))^(alpha)=0;<br>
aly-(1/(B*(ws/w)*(beeta/(1-beeta)))^(beeta-1))=0;<br>
asy-(1/(B*(ws/w)*(beeta/(1-beeta)))^(beeta))=0;<br>
Px-((alx*w)+(asx*ws))=0;<br>
Py-(((aly*w)+(asy*ws))/(1+t))=0;<br>
L-((alx*X)+(aly*Y))=0;<br>
S-((asx*X)+(asy*Y))=0;<br>
endfunction<br>
<br>
Then i called function Solve_m() by providing all the values for exogenous<br>
variables...But m getting error Warning: obsolete use of '=' instead of<br>
'=='.<br>
Px-((alx*w)+(asx*ws))=0;<br>
!<br>
at line 3 of function Solve_m called by :<br>
endfunction<br>
<br>
Can you help where am making mistake ?<br>
<br>
Thanks<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://mailinglists.scilab.org/Simulation-of-static-general-equilbiirum-model-tp4031213p4031219.html" target="_blank">http://mailinglists.scilab.org/Simulation-of-static-general-equilbiirum-model-tp4031213p4031219.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>