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?

 Accepted Answer

Community Treasure Hunt

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

Start Hunting!