Combining multiple columns into one matrix in Matalb

AI Thread Summary
A beginner in MATLAB seeks assistance in combining 300 columns, each with dimensions of 24x1, into a single matrix with dimensions of 24x300. The suggested code snippet involves a loop that assigns each small column matrix to the corresponding column of a larger matrix. There is a note of caution regarding the correct indexing, with a reminder that the user may need to adjust the indexing from column-wise to row-wise if necessary.
bashar_aden
Messages
1
Reaction score
0
Hi

I am a beginner in using Matlab software. I want to combine 300 columns into one matrix. The dimension of each column is 24x1. Meaning, the resultant matrix should have a dimension of 24x300. Anybody can help me in this?

Any help is much appreciated!

Thanks
 
Physics news on Phys.org
try:

for i =1:300
Big_Matrix(:,i) = small_matrix;
end

if that isn't right, then replace (:,i) by (i,:), I always screw it up and have to redo it.
 

Similar threads

Back
Top