📄 s1_4.m
字号:
%Signal & System 1-4
%建立方波与锯齿波
clf
figure(1)
x=[0:0.01:10];
y=square(pi*x);
subplot(221)
plot(x,y);
axis([0,10,-2,2]);
title('方波');xlabel('x');ylabel('y');
y=square(pi*x,20);
subplot(222)
plot(x,y);
axis([0,10,-2,2]);
title('方波');xlabel('x');ylabel('y');
x=[0:0.01:10];
y=sawtooth(pi*x);
subplot(223)
plot(x,y);
axis([0,10,-2,2]);
title('锯齿波');xlabel('x');ylabel('y');
y=sawtooth(pi*x,0.5);
subplot(224)
plot(x,y);
axis([0,10,-2,2]);
title('锯齿波');xlabel('x');ylabel('y');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -