how to combine more than 2 matrics

1 Ansicht (letzte 30 Tage)
ajith
ajith am 23 Mai 2013
i have 1x 400 matrix at 6 times i need to combine to 6x 400 matrix how do i do it i try
q=[latent;latent1;latent2;latent3;latent4;latent5;latent6;latent7];
its show error
??? Error using ==> vertcat CAT arguments dimensions are not consistent.
Error in ==> super at 57

Antworten (2)

Iain
Iain am 23 Mai 2013
That error comes up whenever you try to combine vectors of incorrect sizes.
You claim to have 6 vectors to combine, but your example code has 8 components - 2 of these are probably the wrong size
  1 Kommentar
Azzi Abdelmalek
Azzi Abdelmalek am 23 Mai 2013
If you want to add a comment, click on comment on this question or comment on this answer

Melden Sie sich an, um zu kommentieren.


Azzi Abdelmalek
Azzi Abdelmalek am 23 Mai 2013
Bearbeitet: Azzi Abdelmalek am 23 Mai 2013
a1=[1 2 3]
a2=[4 5 6]
a3=[7 8 9]
out=[a1;a2;a3]
There is no reason to get an error, unless your array are not the same size

Kategorien

Mehr zu Resizing and Reshaping 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!

Translated by