how to save results from every loop with permutation
2 次查看(过去 30 天)
显示 更早的评论
a = [1 2 3; 4 5 6; 7 8 9];
idx = perms(1:size(a,2));
for ii = idx'
your_mat = a(:,ii)
end
I want to know how do I write a result matrix (in this case 18x3) that contains results from every loop. Thank you.
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!