How to find the x and y coordinates of the maximum value in curve without defferntiaition

64 views (last 30 days)
Hi I have a curve,I want to find x and y coordinate of the maximum value Thanks

Accepted Answer

Image Analyst
Image Analyst on 4 Jun 2015
If x and y are in arrays, how about
[maxY, indexOfMaxY] = max(y);
xAtMaxY = x(indexOfMaxY);
  9 Comments
Image Analyst
Image Analyst on 5 Jun 2015
I hope someone with the Communications toolbox can help you. I don't have that so I can't run your code, specifically the awgn() function. I did format it for you though and added the Communications Toolbox to the product list above.

Sign in to comment.

More Answers (1)

yousef Yousef
yousef Yousef on 5 Jun 2015
Edited: yousef Yousef on 5 Jun 2015
  • z=abs(P);
  • zz=round(z);
  • ymax=max(zz);
  • xmax=THETA(find (zz==ymax));
  • However ,if somebody has better solution,I kindly ask hem or her to provide me with.Thanks
  7 Comments
yousef Yousef
yousef Yousef on 5 Jun 2015
Thanks I think it is working great.But I still need to run it so many times to be sure.I will assure you if there is a problem in the results with this way of solving or not. Thanks a lot
Alfonso Nieto-Castanon
Alfonso Nieto-Castanon on 5 Jun 2015
great, if that works please accept ImageAnalyst solution above since this was basically his original suggestion

Sign in to comment.

Categories

Find more on Communications Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!