max co-ord on graph
古いコメントを表示
I have a 2D line graph (X and Y). X is a variable, Y has no variable assigned. I just want to show the co-ordinates of the peak as I am trying to show that it will peak when Y = 1.
How?
Thanks
1 件のコメント
the cyclist
2013 年 2 月 25 日
You have no Y data. What is it that is going to peak when Y=1?
Please add some details. You have not described your problem clearly enough (at least not for me to understand it).
回答 (1 件)
Thorsten
2013 年 2 月 25 日
[Y_peak ind] = max(Y)
X_peak = X(ind);
disp(['Function peaks at X = ' num2str(X_peak) ...
' with value ' num2str(y_peak) '.'])
カテゴリ
ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!