[Scilab-users] Simulation of static general equilbiirum model

Mathseco rashmi.19 at gmail.com
Sun Sep 28 15:56:50 CEST 2014


@Eric : Thank you so much ...my function works as you told..Sorry i ask so
many ques as i'm just a beginner in scilab ...i'll be highly grateful if you
could help me in one more ques....This is the function which i have written
:
clear;
function resid=Solve_m(param)
resid(1)=param(5)-(1/((A*((param(2)/param(1))*(alpha/(1-alpha))))^(alpha-1)));
resid(2)=(param(7)*A*(((param(2)/param(1))*(alpha/(1-alpha)))^alpha))-1;
resid(3)=(param(8)*B*(((param(2)/param(1))*(beeta/(1-beeta)))^beeta))-1;
resid(4)=(param(6)*B*(((param(2)/param(1))*(beeta/(1-beeta)))^beeta))-1;
resid(5)=((param(5)*param(1))+(param(7)*param(2)))-Px;
resid(6)=((param(6)*param(1))+(param(8)*param(2)))-(Py*(1+t));
resid(7)=((param(5)*param(3))+(param(6)*param(4)))-L;
resid(8)=((param(7)*param(3))+(param(8)*param(4)))-S;
endfunction

//constants
A=10;
B=10;
t=0.2;
Px=1;
Py=1;
alpha=0.3;
beeta=0.1;
L=500;
S=200;

sol=fsolve([1,10,1280,1200,0.2,0.06,0.1,0.09],Solve_m);
w=sol(1);
ws=sol(2);
X=sol(3);
Y=sol(4);
alx=sol(5);
aly=sol(6);
asx=sol(7);
asy=sol(8);

I have calculated the same values manually just to check whether what i'm
doing through scilab is correct or not because i need to use this for more
complicated models. But unfortunately, my manual calculated values  and the
one i got through above function is not coming same...Could you help wht can
be the reason? (I have double check the calculated manual values) , Thanks



--
View this message in context: http://mailinglists.scilab.org/Simulation-of-static-general-equilbiirum-model-tp4031213p4031225.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list