How can I remove elements between certain limits?

1 次查看(过去 30 天)
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