필터 지우기
필터 지우기

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 (최근 30일)
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

채택된 답변

Star Strider
Star Strider 2018년 3월 24일
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개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by