Effacer les filtres
Effacer les filtres

Making two matrices have the same size

3 vues (au cours des 30 derniers jours)
med-sweng
med-sweng le 23 Fév 2014
Commenté : Image Analyst le 23 Fév 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 commentaire
Image Analyst
Image Analyst le 23 Fév 2014
How you do it depends on what direction you want the 71 pixels to go (before they run out): down or across.

Connectez-vous pour commenter.

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 23 Fév 2014
Modifié(e) : Azzi Abdelmalek le 23 Fév 2014
A=rand(71,1) % Example
A=reshape([A;zeros(14*14-71,1)],14,14)

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by