Filter löschen
Filter löschen

extracting positive numbers?

6 Ansichten (letzte 30 Tage)
AR
AR am 16 Dez. 2015
Bearbeitet: Stephen23 am 17 Dez. 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.

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by