<div dir="ltr">Hi<div><br></div><div>As expalined peviously you hav to write a function with a vetor of size 8 (the number of endogenous variables) as input and a vetcor of size 8 (the number of equations) as output, each corrdinates of this vector being the residual of an equation (look at the example, it seems to me easy to tarnspsoe to your case...)</div><div><br></div><div>It should look like:</div><div><br></div><span style="font-size:13px;font-family:arial,sans-serif">function resid=</span><span style="font-size:13px;font-family:arial,sans-serif">Solve_m(param</span><span style="font-size:13px;font-family:arial,sans-serif">)</span><br style="font-size:13px;font-family:arial,sans-serif"><div><span style="font-family:arial,sans-serif;font-size:13px">resid(1)=param(4)-(1/(A*(param(2)/param(1))*(alpha/(1-</span><span style="font-family:arial,sans-serif;font-size:13px">alpha)))^(alpha-1));</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">resid(2)=param(7)-1/(A*(</span><span style="font-family:arial,sans-serif;font-size:13px">param(2)/param(1)</span><span style="font-family:arial,sans-serif;font-size:13px">)*(alpha/(1-</span><span style="font-family:arial,sans-serif;font-size:13px">alpha)))^(alpha)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">[etc.];</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">endfunction</span><br style="font-family:arial,sans-serif;font-size:13px"><br style="font-family:arial,sans-serif;font-size:13px"></div><div>thenĀ </div><div>sol=fsolve(Solve_m)</div><div>w=sol(1).</div><div><br></div><div>Eric.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-27 22:53 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">If i do some steps manually then need to set this function to zero and want<br>
to calculate value of 'r', Can anybody tell me the code to write for it...<br>
(except r here..all other variables are exogenous in this function)<br>
<br>
L*((Px*A*(1-alpha))^(1/alpha))*r^(-1/alpha)+(S*((Py*B*(1-beeta))^(1/beeta))*r^(-1/beeta))-K=0;<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://mailinglists.scilab.org/Simulation-of-static-general-equilbiirum-model-tp4031213p4031222.html" target="_blank">http://mailinglists.scilab.org/Simulation-of-static-general-equilbiirum-model-tp4031213p4031222.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>