<div dir="ltr">Hi<div><br></div><div>The function does not seem to match the problem you exposed. For instance, I Would have written:</div><div>resid(2)=<span style="font-size:13px;font-family:arial,sans-serif">param(7)-1/(A*(</span><span style="font-size:13px;font-family:arial,sans-serif">param(2)/param(1)</span><span style="font-size:13px;font-family:arial,sans-serif">)*(alpha/(1-</span><span style="font-size:13px;font-family:arial,sans-serif">alpha)))^(alpha)</span></div><div><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div><font face="arial, sans-serif">You can simply check that your function si 0 at the solution you calculated manually:</font></div><div><font face="arial, sans-serif">Solve_m(solution)</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">I this is not 0 (or very small numbers), then either the function does not replicate your problem and you must cahnge it until it is the case or your solution is wrong.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">I this is 0, come back to me.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Éric.</font></div><div><font face="arial, sans-serif"><br></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-28 15:56 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">@Eric : Thank you so much ...my function works as you told..Sorry i ask so<br>
many ques as i'm just a beginner in scilab ...i'll be highly grateful if you<br>
could help me in one more ques....This is the function which i have written<br>
:<br>
clear;<br>
function resid=Solve_m(param)<br>
resid(1)=param(5)-(1/((A*((param(2)/param(1))*(alpha/(1-alpha))))^(alpha-1)));<br>
resid(2)=(param(7)*A*(((param(2)/param(1))*(alpha/(1-alpha)))^alpha))-1;<br>
resid(3)=(param(8)*B*(((param(2)/param(1))*(beeta/(1-beeta)))^beeta))-1;<br>
resid(4)=(param(6)*B*(((param(2)/param(1))*(beeta/(1-beeta)))^beeta))-1;<br>
resid(5)=((param(5)*param(1))+(param(7)*param(2)))-Px;<br>
resid(6)=((param(6)*param(1))+(param(8)*param(2)))-(Py*(1+t));<br>
resid(7)=((param(5)*param(3))+(param(6)*param(4)))-L;<br>
resid(8)=((param(7)*param(3))+(param(8)*param(4)))-S;<br>
endfunction<br>
<br>
//constants<br>
A=10;<br>
B=10;<br>
t=0.2;<br>
Px=1;<br>
Py=1;<br>
alpha=0.3;<br>
beeta=0.1;<br>
L=500;<br>
S=200;<br>
<br>
sol=fsolve([1,10,1280,1200,0.2,0.06,0.1,0.09],Solve_m);<br>
w=sol(1);<br>
ws=sol(2);<br>
X=sol(3);<br>
Y=sol(4);<br>
alx=sol(5);<br>
aly=sol(6);<br>
asx=sol(7);<br>
asy=sol(8);<br>
<br>
I have calculated the same values manually just to check whether what i'm<br>
doing through scilab is correct or not because i need to use this for more<br>
complicated models. But unfortunately, my manual calculated values and the<br>
one i got through above function is not coming same...Could you help wht can<br>
be the reason? (I have double check the calculated manual values) , Thanks<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://mailinglists.scilab.org/Simulation-of-static-general-equilbiirum-model-tp4031213p4031225.html" target="_blank">http://mailinglists.scilab.org/Simulation-of-static-general-equilbiirum-model-tp4031213p4031225.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>