Help iteration for loop and tables vertcat
Show older comments
Hi,
- I have a varible C which is a 45x2 double with the possible combinations of numbers, #, from 1 to 10 (meaning 10 birds).
- Per bird I have a table named tablevars#, where # are numbers from 1 to 10.
- I want to have inside the for cycle the total table that will change per combination (matches each row of C per iteration i).
tablevars1
tablevars2
...
w = [1:10];
p = 2;
C = nchoosek(w,p);
u = length(C);
for i = 1:u
total = vertcat(?);
...
end
Thank you!
1 Comment
Stephen23
on 27 May 2022
Do NOT force meta-data (e.g. pseudo-indices) into variable names:
Accepted Answer
More Answers (1)
Walter Roberson
on 27 May 2022
1 vote
Don't do this. put the tables in a cell array and use cell indexing instead of dynamic variable names.
Categories
Find more on Logical 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!