I have problem with matrix form.
이전 댓글 표시
R=[1; 2; 3; 4; 5;]
G=1./R
isl=1
us2=10
alpha=2
A =[G(4) ,0 ,-G(4), 0,0,-1,1;
0,G(1)+G(2)+G(3), -G(2), 0, -G(1),0,0;
-G(4), -G(2), G(2)+G(4)+G(5),0,0,0;
0,0,-G(5),G(5),0,0,-1;
0,-G(1),0,0,G(1),1,0;
-1,0,0,0,1,0,0;
0,G(3)*alpha,0,0,0,0,-1]
b=[0;0;is1;0;0;us2;0]
x=A\b;
Ur=[x(5)-x(2); x(2)-x(3); x(2);x(1)-x(3);x(4)-x(3)]
Ir=Ur./R
i got Error using vertcat
Dimensions of matrices being concatenated are not consistent.
where is problem?
답변 (1개)
Star Strider
2019년 10월 27일
The third row of ‘A’ only has 6 elements:
-G(4), -G(2), G(2)+G(4)+G(5),0,0,0;
The other rows have 7.
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!