|
"tirinacria CICCIOCICCIO" <d.accorso@tin.it>
MAT={'A','B','C','D','E','F'};
comb=nchoosek(MAT,3);
MAT='ABCDEF';
comb=nchoosek(MAT,3);
[m,n]=size(comb);
str='Det=[';
for i=1:m
str=[str,'|',comb(i,1),'|*','|',comb(i,2),'|*','|',comb(i,3),'|,'];
end
str=[str(1:end-1),']'];
eval(str)
<hat45s$s8b$1@fred.mathworks.com>...
> Hey I’m a new user.
> I want to perform this:
>
> I have 6 square matrixes A B C D E F
> I want to find the possible combinations of these matrixes taken 3 at a time and calculate the product of the determiner of each combination
> In order to find all possible combinations I can do this:
> MAT={‘A’,’B’,’C’,’D’,’E’,’F’}
> comb=nchoosek(MAT,3)
> The results is:
>
> comb =
>
> 'A' 'B' 'C'
> 'A' 'B' 'D'
> 'A' 'B' 'E'
> 'A' 'B' 'F'
> 'A' 'C' 'D'
> 'A' 'C' 'E'
> 'A' 'C' 'F'
> 'A' 'D' 'E'
> 'A' 'D' 'F'
> 'A' 'E' 'F'
> 'B' 'C' 'D'
> 'B' 'C' 'E'
> 'B' 'C' 'F'
> 'B' 'D' 'E'
> 'B' 'D' 'F'
> 'B' 'E' 'F'
> 'C' 'D' 'E'
> 'C' 'D' 'F'
> 'C' 'E' 'F'
> 'D' 'E' 'F'
> Then I know all combinations
>
> Now I want to create with a for cycle a matrix with like this:
>
> Det=[|A|*|B|*|C| , | A|*|B|*D|,………]
> How can I perform this multiplication?
> The problem is that in the matrix comb, A is a text.
> Please give me some advice
> Thanks
|