Please help me how to deal with this. i double check this but the same error occurred "Error using vertcat Dimensions of matrices being concatenated are not consistent."
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Warda Panondi
le 24 Mar 2018
Réponse apportée : Star Strider
le 24 Mar 2018
M=diag([m10 m9 m8 m7 m6 m5 m4 m3 m2 m1]);
C1=[k10 -k10 0 0 0 0 0 0 0 0];
C2=[-k10 (k10+k9) -k9 0 0 0 0 0 0 0];
C3=[0 -k9 (k9+k8) -k8 0 0 0 0 0 0 ];
C4=[0 0 -k8 (k8+k7) -k7 0 0 0 0 0];
C5=[0 0 0 -k7 (k7+k6) -k6 0 0 0 0] ;
C6=[0 0 0 0 -k6 (k6 +k5) -k5 0 0 0] ;
C7=[0 0 0 0 0 -k5 (k5+k4) -k4 0 0] ;
C8=[0 0 0 0 0 0-k4 (k4 +k3) -k3 0] ;
C9=[0 0 0 0 0 0 0 -k3 (k3+k2) -k2 ];
C10=[0 0 0 0 0 0 0 0 -k2 (k2+k1)];
K=[C1; C2; C3; C4 C5; C6; C7; C8; C9; C10];
n=10; %number of freedom degrees
[V,D]=eig(K,M); % V = eigenvectors
0 commentaires
Réponse acceptée
Star Strider
le 24 Mar 2018
The ‘C8’ vector has 9 columns because ‘0-k4’ is assumed to be a single element. Spaces (and other delimiters) are important in vectors.
C8=[0 0 0 0 0 0-k4 (k4 +k3) -k3 0];
↑ ← PUT A SPACE HERE
C8=[0 0 0 0 0 0 -k4 (k4 +k3) -k3 0];
That will work.
0 commentaires
Plus de réponses (0)
Voir également
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!