help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Findpeaks function


From: José Abílio Matos
Subject: Re: Findpeaks function
Date: Thu, 25 Feb 2021 12:54:45 +0000

On Thursday, February 25, 2021 11:33:04 AM WET Blaz wrote:

> index=[];

> ic=1;

> for i=1:length(c)

>   if c(i) < 600 && c(i) > 200 && x(i) < 500 && y(i) < 500

>     index(ic)=i;

>     ic=ic+1;

>   end

> end


This part can probably be reduced to:

index = c < 600 && c > 200 && x < 500 && y < 500;


and that is it. :-)

--

José Matos


reply via email to

[Prev in Thread] Current Thread [Next in Thread]