急,在线等matlab错误,怎么改 Unbalanced or unexpected parenthesis or bracket.>> clearfor k=1:101w=0.02*(k-1)+1e-8;C1=2;C3=2;C2=4/3;L2=1;L4=1;Z1=1./(w*C1*j);Z3=1./(w*C3*j);Z2=L2*j*w+1./(j*w*C2);Z4=L4*j*w; ZL=1;Ya=[1./Z4, -1./Z4; -1./Z4, 1./Z4]
来源:学生作业帮助网 编辑:作业帮 时间:2024/12/02 08:22:27
急,在线等matlab错误,怎么改 Unbalanced or unexpected parenthesis or bracket.>> clearfor k=1:101w=0.02*(k-1)+1e-8;C1=2;C3=2;C2=4/3;L2=1;L4=1;Z1=1./(w*C1*j);Z3=1./(w*C3*j);Z2=L2*j*w+1./(j*w*C2);Z4=L4*j*w; ZL=1;Ya=[1./Z4, -1./Z4; -1./Z4, 1./Z4]
急,在线等matlab错误,怎么改 Unbalanced or unexpected parenthesis or bracket.
>> clear
for k=1:101
w=0.02*(k-1)+1e-8;
C1=2;C3=2;C2=4/3;L2=1;L4=1;
Z1=1./(w*C1*j);Z3=1./(w*C3*j);
Z2=L2*j*w+1./(j*w*C2);
Z4=L4*j*w; ZL=1;
Ya=[1./Z4, -1./Z4; -1./Z4, 1./Z4];
Zb=[Z1+Z2,Z2; Z2, Z3+Z2];Yb=inv(Zb);
Y=Ya+Yb;Z=inv(Y);
H(k)=Z(2,1)*ZL./(det(Z)+Z(1,1).*ZL);
Zin(k)=(det(Z)+Z(1,1)*ZL)./(Z(2,2)+ZL);
end
w1=[0:100]*0.02;
figure(1)
subplot(2,1,1),plot(w1,abs(H))
axis([0 2 0 2])
subplot(2, 1, 2),plot(w1,unwrap(angle(H)))
axisc[0 2 -10 0]
figure(2)
subplot(2,1,1),plot(w1,real(H))
subplot(2,1,2),plot(w1,imag(H))
figure(3)
subplot(2,1,1), plot(w1,real(Zin))
axis([0 2 0 2])
subplot(2, 1, 2),plot(w1,imag(Zin))
axisc[0 2 2 0.2]
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 3.725290e-017.
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 3.725290e-017.
报错? axisc[0 2 -10 0]
|
Error: Unbalanced or unexpected parenthesis or bracket.
急,在线等matlab错误,怎么改 Unbalanced or unexpected parenthesis or bracket.>> clearfor k=1:101w=0.02*(k-1)+1e-8;C1=2;C3=2;C2=4/3;L2=1;L4=1;Z1=1./(w*C1*j);Z3=1./(w*C3*j);Z2=L2*j*w+1./(j*w*C2);Z4=L4*j*w; ZL=1;Ya=[1./Z4, -1./Z4; -1./Z4, 1./Z4]
Matlab中好像没有axisc这个函数吧,是不是应该是axis?