does anyone have the matlab code for removing the negative half of an sinosudal wave
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Rahul
le 27 Fév 2013
Commenté : Helphelpelectronic
le 8 Nov 2020
i guess there would be an function but i dont know what it is...can anyone help
0 commentaires
Réponse acceptée
the cyclist
le 27 Fév 2013
Modifié(e) : the cyclist
le 27 Fév 2013
If you just have values in a vector, then
s(s<0) = [];
will remove them (leaving you with a vector of shorter length), or
s(s<0) = 0;
will set the negative values to zero, or
s(s<0) = NaN;
will set them to NaN.
If you mean something else, please provide more detail.
1 commentaire
Helphelpelectronic
le 8 Nov 2020
Can you just say signal<0 for getting it negative values? Because I had an error for doing that while writing a condition for if statement
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Spectral Measurements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!