How to write a function which determines the minimum and maximum values of a two input function over two intervals?
Afficher commentaires plus anciens
I have no idea how to do this problem. The only thing I know is that I have to use the meshgrid command. Also I am not allowed to use built in commands like fminbnd() and such. I think the only ones I can use are min() and max() and find() to find the coordinates. Help please!!!
Thank you
Réponses (1)
Roger Stafford
le 14 Nov 2013
0 votes
Presumably you are expected to use 'meshgrid' to create a mesh of all possible combinations of your two inputs over their respective intervals using finely divided subintervals in each. Then the function is to be calculated for each possible combination and 'max' and 'min' applied to the result. Of course no matter how fine these subdivisions are, you will only have approximate values for the maximum and minimum. (I don't think you need the 'find' function.)
To achieve ultimate accuracy on such a problem you would need iterative procedures such as are used in 'fminbnd' in seeking the precise minima and maxima using ever smaller search areas. Somehow, from the way your problem is stated I don't think you are expected to do that.
1 commentaire
Nohely Rivera
le 14 Nov 2013
Catégories
En savoir plus sur Data Distribution Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!