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 日

0 投票

function B=eqnB(E,F)
fun=@(b)b*tanh(b)-E*F;
B=fsolve(fun,1);
end

3 件のコメント

abhijeet singh
abhijeet singh 2021 年 2 月 11 日
Thanks for the ready reply @David Hill. In the first line you mentioned eqnB, is it just name of function of any comatlab command?
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 件)

カテゴリ

ヘルプ センター および File Exchange で Programming についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by