MATLAB: Delete row in matrix and move

matrix deleting coulmns

Hi, I have Matrix [500000 rows x 3 columns]. In 3 columns are data from -1100 to +1000. I want delete a row if in 3 columns data are < -900. Next I'd like to move another rows in a place of deleted column and wrie as a new matrix. For example:
A=[20 30 40; 20 40 -930; 30 40 600];
In the 2nd row in 3d column is -930. I'd like to have
B=[20 30 40; 30 40 600];
Thanks for your help

Best Answer

Let assume matrix M, It deletes the rows having element less than -900
M(M(:, 3)<-900, :)=[]