How I can solve a simple system of equations
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
David Sanchez
2014년 1월 9일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!