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!

