How I can solve a simple system of equations
Afficher commentaires plus anciens
Hi,
I want to solve the following system
w = A*(1-gamma)*k^(gamma);
r = A * gamma * k^(gamma-1);
H = w + (1-beta)*(1+r)*(k+debt)-(r-n)*debt;
k =(1/(1+n))*(mu*H) - debt;
My parameters are defined as follows
alpha = 0.6;
beta = alpha;
A = 7;
xi = 0 ;
gamma = 0.3;
debt = 0.05; % debt = 0.22;
mu = (1-alpha)/(1-alpha*xi);
n = 1.097;
Basically, everything boils down to a polynomial expression for k,
could you please advice how this can be solved in the most efficient way ?
PS: All are scalars if it matters, and apparently the solution for k might be multiple and not necessary real
Many thanks
Réponses (1)
David Sanchez
le 9 Jan 2014
Define k as symbolic
syms k
alpha = 0.6;
beta = alpha;
A = 7;
xi = 0 ;
gamma = 0.3;
debt = 0.05; % debt = 0.22;
mu = (1-alpha)/(1-alpha*xi);
n = 1.097;
w = A*(1-gamma)*k^(gamma);
r = A * gamma * k^(gamma-1);
H = w + (1-beta)*(1+r)*(k+debt)-(r-n)*debt;
k =(1/(1+n))*(mu*H) - debt;
>> k
k =
(400*(21/(25*k^(7/10)) + 2/5)*(k + 1/20))/2097 + (1960*k^(3/10))/2097 - 14/(699*k^(7/10)) - 8291/209700
1 commentaire
msh
le 9 Jan 2014
Catégories
En savoir plus sur Structural Mechanics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!