Matlab在信号和系统中的应用.docVIP

  • 9
  • 0
  • 约5.3万字
  • 约 38页
  • 2019-06-16 发布于广东
  • 举报
MATLAB在信号和系统中的应用 9.1.1 连续时间信号的表示 rectpuls函数:产生矩形波 调用格式为:x = rectpuls (t, width) 例1:生成幅度为2,宽度T = 4,中心在t = 0的矩形波x(t)以及x(t-T/2) Fs=10000; %采样频率 t = -4 : 1/Fs : 4; T = 4; x1 = 2*rectpuls(t, T); subplot(121);plot(t, x1); title(x(t)); axis([-4 6 0 2.2]); x2 = 2*rectpuls(t-T/2,T); subplot(122);plot(t, x2); title(x(t-T/2)); axis([-4 6 0 2.2]); 方波发生函数: square() 例2:产生50Hz占空比分别为20%和50%的矩形波。 Fs=10000; %采样频率 t=0:1/Fs:0.1; %采样间隔1/Fs f=50; %50Hz x1=square(2*pi*50*t,20); x2=square(2*pi*50*t,50); subplot(211); plot(t,x1); subplot(212); plot(t,x2); 三角波或锯齿波发生函数: sawtooth()语法格式sawtooth(t

文档评论(0)

1亿VIP精品文档

相关文档