How can I remove elements between certain limits?

1 view (last 30 days)
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

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 29 Dec 2013
A(A<0 | A>1000)=[]

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!