asha g wrote
>
> Andrew,
> this is great.Now I want all the peak values - I have about 3- 4 maxima
> for x= 55 .
>
> How do I get this program to give me all the peak values and the
> corresponding x values. Here it is selecting one value of the entire
> lot.
>
> Thanks
> Asha
>
Oops, I missed this. If all you want are the indices of vector that equal
the maximum value, that's a whole lot easier than finding local maxima.
idx = find(vv1 ==
max(vv1))
But it will only give one max value instead of all the peak values - I need all peak values and their corresponding x values.