?? program3_2.m
字號:
t=0:0.01:10;
w1=pi/5;n1=1;n2=3;n3=5;
f=u(t)-2*u(t-5)+u(t-10);
f1=(4/pi)*sin(w1*t);
f2=f1+(4/(3*pi))*sin(3*w1*t);
f3=f2+(4/(5*pi))*sin(5*w1*t);
subplot(321)
plot(t,f,'r:');hold on;title('The approximate curves of f(t)')
plot(t,f1);hold on;text(5,1.5,'N=1');
subplot(322)
plot(t,f-f1);title('The erroe')
subplot(323)
plot(t,f,'r:');hold on;plot(t,f2);hold on;text(5,1.5,'N=3');
subplot(324)
plot(t,f-f2)
subplot(325)
plot(t,f,'r:');hold on;plot(t,f3);text(5,1.5,'N=5');
subplot(326)
plot(t,f-f3);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -