Borrar filtros
Borrar filtros

Min/Max Values of a polynomial function using yminbnd

5 visualizaciones (últimos 30 días)
Joseph DeMaria
Joseph DeMaria el 22 de Nov. de 2020
Comentada: John D'Errico el 22 de Nov. de 2020
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 comentario
John D'Errico
John D'Errico el 22 de Nov. de 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)

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by