A = [A;zeros(mod(d-mod(size(A,1),d),d),size(A,2))];
Padding zeros at the end row of a matrix
2 次查看(过去 30 天)
显示 更早的评论
For a matrix A = Nx2, how to pad [0 0] row at the end of the matrix to make the number of rows divisible by a number d?
example: for A = 9x2 and d = 2 adding 1 [0 0] row at end will make it 10x2
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!