Solving an equation for a variable
3 次查看(过去 30 天)
显示 更早的评论
I am given the following equation,
fx =@(x) ((15*3)/(3*pi^4*70*5.29E-6))*(48*3^3*cos((pi*x)/(2*3))-(48*3^3)+(3*pi^3*3*x^2)-(pi^3*x^3));
If I wanted to find the value of x at say fx = 10, is there a shortcut to do so in MATLAB?
0 个评论
采纳的回答
Walter Roberson
2021-2-22
The trick is to create a new function, such as fx10, that is fx(x)-10 and then do root finding (fzero, fsolve, vpasolve) on that new function.
5 个评论
Walter Roberson
2021-2-23
The second input is a starting guess.
I used a negative starting guess and a modest positive starting guess. Afterwards I plotted to confirm.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!