1、工具箱中常见的函数
(1)sawtooth函数
sawtooth函数用于产生锯齿波或三角波信号,格式如下:
t=0:0.0001:1;
y=sawtooth(2*pi*50*t);
subplot(211);
plot(t,y)
axis([0,0.2,-1,1]);
y1=sawtooth(2*pi*50*t,0.5);
subplot(212);
plot(t,y1)
axis([0,0.2,-1,1]);
(2) square函数
square函数用于产生方波信号,调用格式为:
t=0:0.0001:1;
y1=square(2*pi*50*t);
subplot(211);
plot(t,y1)
axis([0,0.2,-2,2]);
xlabel('方波信号');
y2=square(2*pi*50*t,70);
subplot(212);
plot(t,y2)
axis([0,0.2,-2,2]);
xlabel('正半周期所占比例为70%');
(3) sinc函数
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)