How can I remove elements between certain limits?

1 Ansicht (letzte 30 Tage)
simply90
simply90 am 29 Dez. 2013
Kommentiert: simply90 am 29 Dez. 2013
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

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 29 Dez. 2013
A(A<0 | A>1000)=[]

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by