help-octave
[Top][All Lists]
Advanced

[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)

Hello

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
result2.

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.

Thanks

  Wave_peaks.png
<https://octave.1599824.n4.nabble.com/file/t373917/Wave_peaks.png>  



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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