I have 10 column vectors with 4 elements each. I need do build a 4×4 matrix with different combinations of 4 of those vectors.
Example:
V1 = [2;4;2;1];
V2 = [3;3;5;1];
V3 = [4;1;2;1];
V4 = [7;8;1;1];
V5 = [5;4;2;1];
V6 = [1;8;7;1];
V7 = [3;2;0;1];
V8 = [9;8;1;1];
V9 = [1;4;7;1];
V10 = [2;1;5;1];
First 4X4 matrix combination should look like this:
M1 = [V1 V2 V3 V4];
Second 4X4 matrix combination should look like this:
M2 = [V1 V2 V3 V5];
I need a code to give me all the possible matrix with 4 different vectors.
Thank you!
Best Answer