📄 untitled3.m
字号:
w1s=2;w1p=1;N=5;
w2s=0.5;w2p=1;
for m=1:3
if m==1
for i=0:1:10
w1=0:0.1:i*0.1;
if i==0
w2=3.2;
elseif i==1
w2(2)=3.1
elseif i==2
w2(3)=3.0
elseif i==3
w2(4)=2.8
else
w2(i+1)=1/w1(i+1);
end
G=1./((j.*w1).^5+3.236.*(j.*w1).^4+5.2361.*(j.*w1).^3+5.2361.*(j.*w1).^2+3.2361.*(j.*w1)+1);
G1=abs(G);
subplot(2,1,1)
plot(w1,G1);hold on
axis([0,3.5,0,1.2])
subplot(2,1,2)
plot(w2,G1); hold on
axis([0,3.5,0,1.2])
pause(0.4)
end
end
if m==2
clear w1 w2 G1 G;
for i=10:1:20
w1=1:0.1:0.1*i;
w2(i-10+1)=1/w1(i-10+1);
G=1./((j.*w1).^5+3.236.*(j.*w1).^4+5.2361.*(j.*w1).^3+5.2361.*(j.*w1).^2+3.2361.*(j.*w1)+1);
G1=abs(G);
subplot(2,1,1)
plot(w1,G1,'r');hold on
axis([0,3.5,0,1.2])
subplot(2,1,2)
plot(w2,G1,'r');hold on
axis([0,3.5,0,1.2])
pause(0.4)
end
end
if m==3
clear w1 w2 G1 G
for i=20:1:30
w1=2:0.1:0.1*i;
w2(i-20+1)=1/w1(i-20+1);
G=1./((j.*w1).^5+3.236.*(j.*w1).^4+5.2361.*(j.*w1).^3+5.2361.*(j.*w1).^2+3.2361.*(j.*w1)+1);
G1=abs(G);
subplot(2,1,1)
plot(w1,G1,'g');hold on
axis([0,3.5,0,1.2])
subplot(2,1,2)
plot(w2,G1,'g');hold on
axis([0,3.5,0,1.2])
pause(0.4)
end
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -