How to write a function which determines the minimum and maximum values of a two input function over two intervals?
Mostrar comentarios más antiguos
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
Respuestas (1)
Roger Stafford
el 14 de Nov. de 2013
0 votos
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 comentario
Nohely Rivera
el 14 de Nov. de 2013
Categorías
Más información sobre Data Distribution Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!