How can I remove elements between certain limits?

조회 수: 1 (최근 30일)
simply90
simply90 2013년 12월 29일
댓글: simply90 2013년 12월 29일
Hi
I know this is a basic problem. I have a vector of random numbers. I now need to loop through and and remove any elements which are < 0 or > 1000 but am having problems. Would anyone have any suggestions how to go about this please?
Thanks

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 12월 29일
A(A<0 | A>1000)=[]

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by