Making two matrices have the same size
1 次查看(过去 30 天)
显示 更早的评论
I have the following two matrices, with the following sizes:
A: 71x1
B: 14x14
How can I make them both of size
14x14?
Can we use some sort of padding with zeros for instance?
How can we go about that?
Thanks.
1 个评论
Image Analyst
2014-2-23
How you do it depends on what direction you want the 71 pixels to go (before they run out): down or across.
采纳的回答
Azzi Abdelmalek
2014-2-23
编辑:Azzi Abdelmalek
2014-2-23
A=rand(71,1) % Example
A=reshape([A;zeros(14*14-71,1)],14,14)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!