How can I delete rows from matrix in matlab?
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
Mohammad Abouali
2015-1-15
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],:)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!