Re: Findpeaks function
José Abílio Matos <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.general |
|---|---|
| Message-ID | <2064192.Icojqenx9y@griffin> |
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