[Top][All Lists]

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

Re: Findpeaks function

From: Andreas Weber
Subject: Re: Findpeaks function
Date: Wed, 24 Feb 2021 19:09:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Am 24.02.21 um 18:28 schrieb Blaz:
The vector result1 should find local peaks (max values). Function
"findpeaks" rejects the inputs since they include negative values so I am
kind a stuck.

you can either move the values like
x = sin(0:0.1:10);
[~, LOC] = findpeaks (x - min(x))

or remove the negative part
x(x<0) = 0;

The vector result2 should give back index of crossing of x and y, where
these are zero (or close to zero). On the chart you can see that not all
crossings of x and y fullfill this condition.

I don't understand this, perhaps you should also upload the data and show some code what you already did.

You might also find "peakdet" interesting

-- Andy

reply via email to

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