|
Hey!
I want to find all possible combinations among a series of matrices ( mat1, mat2, may3,.........matN), taken 4 at the time.
In order to do this I did as follow:
aa= input('how many matrices do you have?);
bb= input('how many matrices do you want in each combination?);
for ii=1:aa
A=input('name of the matrix');
Allmatrices(ii,:) = {A}
allcombinations=nchoosek(Allmatrices,bb)
end
and I get back all possible combinations, but I do not know the nave of the matrices.
what are, for example the matrices that form the second row?
The problem is that at the and I have a matrix like this:
[31x1 double] [31x1 double] [31x1 double] [31x1 double]
[31x1 double] [31x1 double] [31x1 double] [31x1 double]
[31x1 double] [31x1 double] [31x1 double] [31x1 double]
[31x1 double] [31x1 double] [31x1 double] [31x1 double]
………………………………………………………………
………………………………………………………………
But I’ve lost the names of the matrices.
A would like to get something like this:
[mat A] [mat B] [mat B] [mat B]
[mat A] [mat B] [mat B] [mat D]
[mat A] [mat B] [mat B] [mat E]
[mat A] [mat B] [mat C] [mat D]
…………………………………………………………
Please help me.
|