extracting positive numbers?

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 日

0 投票

x=x(x>0);
Look for "logical addressing" in documentation...

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

AR
2015 年 12 月 16 日

編集済み:

2015 年 12 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by