why i get error?
조회 수: 2 (최근 30일)
이전 댓글 표시
M_0=1;
EI=1;
fi=-pi:pi/300:pi;
C5=M_0/(2*EI);
gama=exp(i*fi);
delta_0=4+2*cos(fi);
C_2= [0 ;
-C5*L*gama./delta_0;
C5*(2*gama+1)./delta_0;
-C5*(gama+1)./(L*delta_0)];
I GET:
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.
Error in ==> intgration_for_v_for_loop_chek at 47
C_2= [0 ;
댓글 수: 0
채택된 답변
Wayne King
2014년 1월 1일
편집: Wayne King
2014년 1월 1일
Is this what you want?
M_0=1;
L = 1;
EI=1;
fi=-pi:pi/300:pi;
C5=M_0/(2*EI);
gama=exp(i*fi);
delta_0=4+2*cos(fi);
C_2= [zeros(size(delta_0)) ;
-C5*L*gama./delta_0;
C5*(2*gama+1)./delta_0;
-C5*(gama+1)./(L*delta_0)];
You did not tell us what L was, so I just used 1.
댓글 수: 0
추가 답변 (1개)
Image Analyst
2014년 1월 1일
In the first row you have only a single zero 0. But the second row, -C5*L*gama./delta_0, has as many elements as gama, which has as many elements as fi, which is 601. You can't have 1 element in row 1 and 601 elements in rows 2, 3, and 4. To fix, use as many elements in row 1 as the other rows, like Wayne showed you.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!