# Matrix Dimension Must Agree

3 vues (au cours des 30 derniers jours)
Steve le 14 Déc 2020
Modifié(e) : Steve le 14 Déc 2020
A= eye(3,3)
B= eye(6,6)
kron(A,A) resulting in 9x9 matrix, how can I change the dimension of 9x9 matrix into 6x6 matrix using voight system in matlab
Cep=k*kron(A,A)+2*M*(B-1/3*(kron(A,A))-kron(normal,normal));
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponses (1)

KALYAN ACHARJYA le 14 Déc 2020
Modifié(e) : KALYAN ACHARJYA le 14 Déc 2020
Please change in the following line, having permisible matrix dimention to works perfectly
Cep=k*kron(A,A)+2*M*(B-1/3*(kron(A,A))-kron(normal,normal));
Lets decompose to individual section (2nd Part with Bracket):
>> whos B
Name Size Bytes Class Attributes
B 6x6 288 double
Next
>> 1/3*(kron(A,A));
>> whos ans
Name Size Bytes Class Attributes
ans 36x1 288 double
Next
>> kron(normal,normal);
>> whos ans
Name Size Bytes Class Attributes
ans 9x9 648 double
Lets example matrix A(6x6)-B(36x1)-C(9x9), is that permisible? To addtion or subtraction, all must have same sizes. Please check the code and modify accordingly.
:)
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Operators and Elementary Operations 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