Hi Ganesh,
To find the extreme point of a set of points (x1,y1) you could try:
[maxy1, indexy1] = max(y1);
x1(indexy1);
If
x1 = [0 1 2.5 3.6];
y1 = [-4 -3 -2 -1];
then
[maxy1, indexy1] = max(y1);
x1(indexy1);
gives
maxy1 = -1
x1(indexy1) = 3.6
As an alternative method, it might work that you put the two data sets in an (x,y) array and use different interpolation functions. Some of these functions will include oscillations cause they try to match the points with polynomial functions. However, one of these function, pchip, does not oscillate as freely between the sample points.
You can read more about pchip it in the following link:
Hope this answer can help to answer your question.