필터 지우기
필터 지우기

extracting positive numbers?

조회 수: 2 (최근 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에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by