Solving equations by calling a function

6 次查看(过去 30 天)
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?

请先登录,再进行评论。

更多回答(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