extracting positive numbers?

4 vues (au cours des 30 derniers jours)
AR
AR le 16 Déc 2015
Modifié(e) : Stephen23 le 17 Déc 2015
I have a vector, X [197 1] which has values of 0 or positive numbers. I'd like to identify those indexes with only positive numbers as well as only use those values later in an algorithm? How best can I do this? Thank you.

Réponse acceptée

dpb
dpb le 16 Déc 2015
x=x(x>0);
Look for "logical addressing" in documentation...

Plus de réponses (0)

Catégories

En savoir plus sur Programming 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!

Translated by