How to find the x and y coordinates of the maximum value in curve without defferntiaition
古いコメントを表示
Hi I have a curve,I want to find x and y coordinate of the maximum value Thanks
1 件のコメント
James Tursa
2015 年 6 月 4 日
In what form do you have the curve? A one line definition? A function file? Or what?
採用された回答
その他の回答 (1 件)
yousef Yousef
2015 年 6 月 5 日
編集済み: yousef Yousef
2015 年 6 月 5 日
0 投票
7 件のコメント
Alfonso Nieto-Castanon
2015 年 6 月 5 日
that looks fine, remove the round operation or better yet use ImageAnalyst solution above (replacing y with abs(P) and x with THETA)
yousef Yousef
2015 年 6 月 5 日
Alfonso Nieto-Castanon
2015 年 6 月 5 日
from your code and from your graph, theta is defined from -90 to 90, so it is hard to imagine how you could get -180 as theta(indexOfMaxY), could you please clarify?
yousef Yousef
2015 年 6 月 5 日
Alfonso Nieto-Castanon
2015 年 6 月 5 日
編集済み: Alfonso Nieto-Castanon
2015 年 6 月 5 日
Could you copy and paste the following code and report the result figure and values displayed in the command window?
figure;
plot(theta,Pmusic);
[maxP,maxIdx]=max(Pmusic);
fprintf('Maximum value %f at theta=%f\n',maxP,theta(maxIdx));
yousef Yousef
2015 年 6 月 5 日
Alfonso Nieto-Castanon
2015 年 6 月 5 日
great, if that works please accept ImageAnalyst solution above since this was basically his original suggestion
カテゴリ
ヘルプ センター および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

