Effacer les filtres
Effacer les filtres

Kronecker product of cell array elemnts

1 vue (au cours des 30 derniers jours)
MohammadHossein Salimi
MohammadHossein Salimi le 18 Août 2018
Rouvert : Walter Roberson le 22 Déc 2018
Hi, I have a cell array C=cell(3,20).I want the kronecker product of each element to all the others.How can I do that?!! Thanks in advance.

Réponses (1)

SK
SK le 18 Août 2018
>> CL = repmat(transpose(C(:)), [3*20, 1]);
>> CR = repmat(C(:), [1, 3*20]);
>> P = cellfun(@kron, CL, CR, 'UniformOutput', false);
This gives a 60 x 60 cell array of matrices.
  1 commentaire
SK
SK le 19 Août 2018
I'm sorry I don't understand your question. The code gives kron(C{i,j}, C{k,l}), for all possible pairs including for i = j = k = l.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by