extracting positive numbers?

5 次查看(过去 30 天)
AR
AR 2015-12-16
编辑: Stephen23 2015-12-17
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.

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by