matlab算矩阵,画向量图

问题描述:

matlab算矩阵,画向量图
已知K45=0.96;Z24=0.03+j0.08;Z23=0.024+j0.065;Z34=0.018+j0.05;Y230=Y320=j0.065;Y240=Y420=j0.02;Y340=Y430=j0.013;Z12=j0.105;K21=1.05;Z45=J0.184;I1=i1=2;I5=i5=0.5
试求导纳矩阵Y和节点电压v1,v2,v3,v4,v5 画出有关Y11、Y22、Y23、Y34、Y44、Y55和v4,v5 *2的向量图.
我自己编的这样的,可是放进matlab里不对
clear,close all
format compact
K45=0.96;Z24=0.03+j0.08;Z23=0.024+j0.065;Z34=0.018+j0.05;Y230=Y320=j0.065; Y240=Y420=j0.02;Y340=Y430=j0.013;Z12=j0.105;K21=1.05;Z45=J0.184;I1=i1=2;I5=i5=0.5
Display
y11=1/z12;y12=-1/k21*k21*z12;.........
A=[Y11 Y12 0 0 0;Y21 Y22 Y23 Y24 0;0 Y32 Y33 Y34 0;0 Y42 Y43 Y44 Y45;0 0 0 Y54 Y55 ]
b=[-I1;0;0;0;-I5];
X=A\B
H=compass([V1,V2,V3,V4,V5]);
Set(h,’linstyle’,3);

clear;clc;
format compact
K45=0.96;
Z24=0.03+j*0.08;
Z23=0.024+j*0.065;
Z34=0.018+j*0.05;
Y320=j*0.065;
Y230=Y320;
Y420=j*0.02;
Y240=Y420;
Y430=j*0.013;
Y340=Y430;
Z12=j*0.105;
K21=1.05;
Z45=j*0.184;
i1=2;
I1=i1;
i5=0.5;
I5=i5;
Y11=1/Z12;Y12=-1/(K21*K21*Z12);
Y21=-1/(K21*K21*Z12);Y22=Y230+Y240+1/Z23+1/Z24+1/(K21*K21*Z12);Y23=-1/Z23;Y24=-1/Z24;
Y32=-1/Z23;Y33=Y320+Y340+1/Z23+1/Z34;Y34=-1/Z34;
Y42=-1/Z24;Y43=-1/Z34;Y44=Y420+Y430+1/Z24+1/Z34+1/(K45*K45*Z45);Y45=-1/(K45*K45*Z45);
Y54=-1/(K45*K45*Z45);Y55=1/(K45*K45*Z45);
A=[Y11 Y12 0 0 0;Y21 Y22 Y23 Y24 0;0 Y32 Y33 Y34 0;0 Y42 Y43 Y44 Y45;0 0 0 Y54 Y55]
B=[-I1;0;0;0;-I5];
V=A\B
h=compass([V]);