[Top][All Lists]

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

Findpeaks function

From: Blaz
Subject: Findpeaks function
Date: Wed, 24 Feb 2021 11:28:12 -0600 (CST)


I have two signals x and y ploted versus time vector t (please refer to
function below). I am trying to create two result vectors named result1 and

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. It should find the local max values and give back the value
and its index.

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.

Am I using the "findpeaks" function wrong? Is there a way to accept the
signals with negative values as well?

For result2 is there a function to do this?

Any help is much appreciated.



Sent from:

reply via email to

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