How to equate two equations and find one of the unknown from it as a function of second unknown?

조회 수: 3 (최근 30일)
I have two equations,
R1 = 1.5;
ntone = R1 + etplusone + et; %%Equation(1)
nttwo = log(R1) + 2*etplusone + et^2; %%Equation(2)
%%% Please note, et and etplusone are the unknowns here
I wanted to equate these two equations and obtain etplusone as a function of et
Kindly help or advice on this, please.

채택된 답변

Paul
Paul 2021년 12월 13일
syms et etplusone
R1 = 1.5;
ntone = R1 + etplusone + et; %%Equation(1)
nttwo = log(R1) + 2*etplusone + et^2; %%Equation(2)
soletplusone = solve(ntone == nttwo,etplusone,'ReturnConditions',true)
soletplusone = struct with fields:
etplusone: - et^2 + et + 4929346931268077/4503599627370496 parameters: [1×0 sym] conditions: symtrue
Seems like this would be straightforward to do by hand, wouldn't it?
  댓글 수: 1
Kelvin Anto
Kelvin Anto 2021년 12월 13일
Hi Paul, Thank you for your answer. Yeah my question is actually complicated that this, but I just put an example to see the procedure.

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

추가 답변 (1개)

Voss
Voss 2021년 12월 13일
A little bit of algebra gives:
etplusone = - et^2 + et + R1 - log(R1);

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by