Min/Max Values of a polynomial function using yminbnd
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
John D'Errico
am 22 Nov. 2020
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)
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!