필터 지우기
필터 지우기

Solving a non-linear equation

조회 수: 1 (최근 30일)
sittmo
sittmo 2018년 11월 25일
댓글: madhan ravi 2018년 11월 25일
I am relatively new to MATLAB and just had a quick question. I have the following:
D = (C./r).*(1-(C./V).^(X).*k);
v = V + ((tau.*C)./r).*(1-(C./V).^(X).*h);
L = D./v;
where everything besides C are known values that have already been set:
V = 100;
sigma = 0.15;
r = 0.06;
alpha = 0.5;
tau = 0.35;
X = (2.*r)./sigma.^2;
m = (((1-tau).*X./(r.*(1+X))).^X)./(1+X);
h = (1+X+alpha.*(1-tau).*X./tau).*m;
k = (1+X-(1-alpha).*(1-tau).*X).*m;
I wish to solve for C such that D./v = 1, how can I do this?
  댓글 수: 3
sittmo
sittmo 2018년 11월 25일
Thanks, I edited the question to provide that information.
madhan ravi
madhan ravi 2018년 11월 25일
see my answer below

댓글을 달려면 로그인하십시오.

채택된 답변

madhan ravi
madhan ravi 2018년 11월 25일
편집: madhan ravi 2018년 11월 25일
syms C
V = 100;
sigma = 0.15;
r = 0.06;
alpha = 0.5;
tau = 0.35;
X = (2.*r)./sigma.^2;
m = (((1-tau).*X./(r.*(1+X))).^X)./(1+X);
h = (1+X+alpha.*(1-tau).*X./tau).*m;
k = (1+X-(1-alpha).*(1-tau).*X).*m;
D = (C./r).*(1-(C./V).^(X).*k);
v = V + ((tau.*C)./r).*(1-(C./V).^(X).*h);
C=vpasolve(D==v,C);
D=subs(D);
v=subs(D);
L=D/v

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by