Why Matlab does not have a fmaxsearch?
Show older comments
I know that Matlab has a fminsearch, but why it does not have a fmaxsearch?
2 Comments
Dainery
on 4 Mar 2024
Matlab tiene una función llamada fminsearch, pero no tiene una función llamada fmaxsearch. La razón probable por la que no existe una función fmaxsearch es porque generalmente en problemas de optimización se busca minimizar una función objetivo en lugar de maximizarla. En el caso de querer encontrar el máximo de una función en Matlab, se puede simplemente multiplicar la función por -1 y utilizar fminsearch para encontrar el mínimo de la función negativa. De esta manera se obtendrá el máximo de la función original.
Walter Roberson
on 4 Mar 2024
Approximate translation:
Matlab has a function called fminsearch, but it does not have a function called fmaxsearch. The likely reason why there is no fmaxsearch function is because optimization problems generally seek to minimize an objective function rather than maximize it. If you want to find the maximum of a function in Matlab, you can simply multiply the function by -1 and use fminsearch to find the minimum of the negative function. In this way the maximum of the original function will be obtained.
Accepted Answer
More Answers (0)
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!