From: Dimitris Valapetrou on
How can i calculate the first three maximum values of a signal using the max fuction?

thanks for your help!
From: EE Student on
"Dimitris Valapetrou" <diastro(a)email.com> wrote in message <hseg14$1jn$1(a)fred.mathworks.com>...
> How can i calculate the first three maximum values of a signal using the max fuction?
>
> thanks for your help!


help sort
From: someone on
"Dimitris Valapetrou" <diastro(a)email.com> wrote in message <hseg14$1jn$1(a)fred.mathworks.com>...
> How can i calculate the first three maximum values of a signal using the max fuction?
>
> thanks for your help!

% I'm not sure if this is homework, so I won't give the exact code.
% One method (a hint):
[maxValue, index] = max(signal(:))
% now set signal(index) = []
% and continue on for the next 2 maxValues
From: someone on
"EE Student " <np7(a)cec.wustl.edu> wrote in message <hsei0s$aoi$1(a)fred.mathworks.com>...
> "Dimitris Valapetrou" <diastro(a)email.com> wrote in message <hseg14$1jn$1(a)fred.mathworks.com>...
> > How can i calculate the first three maximum values of a signal using the max fuction?
> >
> > thanks for your help!
>
>
> help sort

But that doesn't use the max function as the OP requested.
From: EE Student on
"someone" <someone(a)somewhere.net> wrote in message <hseia9$3t$1(a)fred.mathworks.com>...
> "EE Student " <np7(a)cec.wustl.edu> wrote in message <hsei0s$aoi$1(a)fred.mathworks.com>...
> > "Dimitris Valapetrou" <diastro(a)email.com> wrote in message <hseg14$1jn$1(a)fred.mathworks.com>...
> > > How can i calculate the first three maximum values of a signal using the max fuction?
> > >
> > > thanks for your help!
> >
> >
> > help sort
>
> But that doesn't use the max function as the OP requested.

True, I guess i didnt see the way to implement it with max short of writting it into a recursion or something similar (which seems to be what you suggested) and thought that would be overkill as opposed to just sorting.