There are 10 matrices from z to z10, as shown in the image.
Simply put,
zhorzcat = [z z2 z3 z4 z5 z6 z7 z8 z9 z10];
It's going to be 11x10.
What I'm curious about here is that assuming there are 100 matrices, it would be too much to write them one by one I wonder if there is another way.
matlab
You can do it as below.
z1=ones(11,1);
z2=ones(11,1)*2;
z3=ones(11,1)*3;
z_sum=[];
for i=1:3
eval("z_sum=[z_sum z"+num2str(i)+"];");
end
© 2024 OneMinuteCode. All rights reserved.