Making two matrices have the same size
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
med-sweng
am 23 Feb. 2014
Kommentiert: Image Analyst
am 23 Feb. 2014
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 Kommentar
Image Analyst
am 23 Feb. 2014
How you do it depends on what direction you want the 71 pixels to go (before they run out): down or across.
Akzeptierte Antwort
Azzi Abdelmalek
am 23 Feb. 2014
Bearbeitet: Azzi Abdelmalek
am 23 Feb. 2014
A=rand(71,1) % Example
A=reshape([A;zeros(14*14-71,1)],14,14)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!