Making two matrices have the same size
2 ビュー (過去 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!