MATLAB: How to delete rows from matrix in matlab

Hello there, I have a linear programming problem as you Know with two matrices left hand side and right hand side. I want to delete the rows from two matrices which are associated with the value zero (0) in the right hand side. Regards, Ghazwan

Best Answer

Let's say you want to delete the r-th row from matrix A. This should work:
A=A([1:r-1 r+1:end],:)