how to save results from every loop with permutation

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.

Antworten (1)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 12 Mai 2020

Beantwortet:

am 12 Mai 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by