extracting positive numbers?

5 visualizzazioni (ultimi 30 giorni)
AR
AR il 16 Dic 2015
Modificato: Stephen23 il 17 Dic 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.

Risposta accettata

dpb
dpb il 16 Dic 2015
x=x(x>0);
Look for "logical addressing" in documentation...

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by