Solving two nonlinear equations

조회 수: 1 (최근 30일)
Franziska
Franziska 2019년 5월 7일
댓글: Franziska 2019년 5월 21일
I want to solve two non-linear equations of the variables and in terms of the third variable A:
where and given. I need and as a function of A only (given α), such that I can plot the solution over a range of A between 0.5 and 2.
I tried to solve the system symbolically, but did not find a solution.
Any Ideas?

채택된 답변

Torsten
Torsten 2019년 5월 7일
편집: Torsten 2019년 5월 7일
A = 0.5:0.01:2;
alpha = 0.5;
l00 = 1;
for i = 1:numel(A)
a = A(i);
fun = @(l0) 1 + alpha*l0^(alpha-1) - l0 - alpha*a*(2-l0)^(alpha-1);
L0(i) = fzero(fun,l00);
L1(i) = 2 - L0(i);
l00 = L0(i);
end
plot(A,L0,A,L1)
%res_L0 = 1-alpha*A.*L1.^(alpha-1)+alpha*L0.^(alpha-1)-L0;
%res_L1 = 1+alpha*A.*L1.^(alpha-1)-alpha*L0.^(alpha-1)-L1;
%plot(A,res_L0,A,res_L1)
  댓글 수: 2
Franziska
Franziska 2019년 5월 7일
thanks it works!
Franziska
Franziska 2019년 5월 21일
Is there any way to get the actual functions and as a function of A?
Such that is a function of A only, and is a function of A only?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by