Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
I have time domain signal that varies in amplitude over time. I need to hold the value of the signal at zero when the amplitude of a peak/trough falls below a certain value.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have time domain signal that varies in amplitude over time. I need to hold the value of the signal at zero when the amplitude of a peak/trough falls below a certain value and begin capturing again when the peak jumps up above this level. Is this possible? So far I've used the findpeaks function to locate the peaks/troughs in the signal that are below a certain amplitude value but I don't know where to go from here?
Thanks in advance!
0 commentaires
Réponses (1)
Cy
le 15 Mar 2016
If you have the signal in vector representation, you can do this easily. For example, given:
v = [0.81, 0.91, 0.12, 0.91, 0.63, 0.09, 0.28, 0.54, 0.95, 0.96];
you could do something like
v((v<0.5)) = 0;
if your threshold was 0.5, to say anything below should be 0
0 commentaires
Cette question est clôturée.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!