Min/Max Values of a polynomial function using yminbnd

10 次查看(过去 30 天)
I'm having trouble figuring out how to use the yminbnd function correctly, as well as finding the max of this function within the interval [-3,4] I can find the roots fine, but the overall objective to my question, is how do I find the min/max of the polynomial x^3-2x^2-11x+10, and assign those variables to ymin and ymax.I plotted the graph to get a visual representation to check my answers, looks like these values should be around -15, and +20. Any help is appreciated, thank you!
  1 个评论
John D'Errico
John D'Errico 2020-11-22
There is no yminbnd function. You said that multiple times. fminbnd will probably work better. But it looks like you already know that, at least when you write code.
Your question is how do you find the min. You already know how to find the min. You set that into ymin. So what is the problem? Let me guess. Your real question in this was you cannot find the max using a tool that knows only how to minimize. But then what would happen if you used the tool to minimize the negative of f(x)? Would that not be an implicit MAXIMIZATION?
What does this do?
@(x) -f(x)

请先登录,再进行评论。

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