Hi ,

I have a matrix 3×1024 . And I need to append all data in a for loop 128 times. so want to size of all 384×1024.

Could you help me ?

Thank you !

a = load('x.mat');

b = load('y.mat');

c = load('z.mat');

for i =1:128

% l = (i-1)*3+1;

% m = i*3;

first = a.ss(:,i,:); % a.ss =1024×128

second = b.kk(:,i,:);% b.kk =1024×128

third = c.zz(:,i,:); % c.zz = 1024×128

first = transpose(first); % now size of first = 1×1024

second = transpose(second); % now size of second = 1×1024

third = transpose(third); % now size of third = 1×1024

% all(l:m) = [first;second;third]; % size of all = 3×1024, want size of all to be 384×1024

all = [first;second;third];

end

## Best Answer