How to delete every nth row?
109 次查看(过去 30 天)
显示 更早的评论
I have a given matrix and I would like to delete every nth row. (Is there any particularity I have to keep in mind given that my matrix will generally not be a multiple of n?)
0 个评论
采纳的回答
the cyclist
2016-11-28
编辑:the cyclist
2016-11-28
If your matrix is A, then
A(n:n:end,:) = [];
will delete every nth row. Your matrix row count does not need to be evenly divisible by n.
更多回答(1 个)
Ramesha Silva
2020-4-24
How to delete all even columns of A?
0.6000 0.4000 0.6000 0.8000 -1.0000
1.0000 2.0000 3.0000 4.0000 5.0000
0 0 0 0 -1.0000
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!