Solving equations by calling a function

조회 수: 6 (최근 30일)
abhijeet singh
abhijeet singh 2021년 2월 11일
댓글: abhijeet singh 2021년 2월 11일
I have a function A=B*C+D, here B,C,D are all different functions (say it Equation 1)
For B, the equation is B*tanh(B)=E*F (say it Equation 2)
Now i want to extract B from this equation and use it in Equation 1. For me the problem is B is not defined explicity, is there any way to extract B and use it in equation 1.

채택된 답변

David Hill
David Hill 2021년 2월 11일
function B=eqnB(E,F)
fun=@(b)b*tanh(b)-E*F;
B=fsolve(fun,1);
end
  댓글 수: 3
David Hill
David Hill 2021년 2월 11일
You have to name your function something. What do you want to name it?
abhijeet singh
abhijeet singh 2021년 2월 11일
ok i got it.

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by