MATLAB: 2d array and 1d array

arrayMATLAB

Hi
I have an array which is 1 X 55 (Called TempStorage) which is updated each iteration of the loop I want to store this information form TempStorage into my 2 D array 3X55 (Called DecodeData) so the first iteration of the loop I want to store TempStorage into DecodeData(row One) and on the second loop store TempStorage into DecodeData(row Two) and on the third loop store TempStorage into DecodeData(row three) how do I declare TempStorage and DecodeData, and how do I send the data from TempStorage to DecodeData(x)
I dont have much experience with Matlab any help would be greatly appreciated
David

Best Answer

N = 3;
DecodeData = nan(N,55);
for k = 1:N
TempStorage = ... whatever defines your 1x55 vector
DecodeData(k,:) = TempStorage;
end
Very basic MATLAB concepts, like how to use loops and how to allocate data using indexing, are introduced here: