Outputting information from a loop
Show older comments
Any ideas as to output all combinations of i and j. Each combination is a vector of size 9*1. Table 2 is a cell array.
for i=1:4
for j=1:4
C=Table2(i,j);
axes_mat=vertcat(C{:});
D=cell2mat(axes_mat);
D=reshape(D,[9,1]);
end
end
Answers (1)
Jan
on 5 Apr 2022
What about:
D = cat(2, Table2{:});
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!