How can I remove rows from a matrix with a for statement and if statement?

I want to remove any of the rows from matrix A whose column 1 is either greater than the max value or less than the min value.
I get the following error:
What am I doing wrong here?

 Akzeptierte Antwort

No loop, if and elseif needed:
A((A(:,1)>maxvalue)|(A(:,1)<minvalue),:)=[]

Kategorien

Community Treasure Hunt

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

Start Hunting!

Translated by