Forcing fsolve to be positive
2 次查看(过去 30 天)
显示 更早的评论
ire = fsolve(@(re) Pgls(P,BV0,FROE,B,re),re0);
is their a way to force fsolve to return a positive ire?
0 个评论
采纳的回答
Torsten
2016-6-23
Insert re^2 instead of re in your equation. When fsolve has finished, take the square root of the value returned.
Best wishes
Torsten.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!