How to write a function which determines the minimum and maximum values of a two input function over two intervals?
古いコメントを表示
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
回答 (1 件)
Roger Stafford
2013 年 11 月 14 日
0 投票
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.
カテゴリ
ヘルプ センター および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!