信号的产生——diric函数(周期函数sinc发生器)
功能:周期函数sinc发生器,其调用格式如下:y=diric(x,n)
% E_2_12_diric.m
% 信号的产生——diric函数,
% 功能:周期函数sinc发生器,其调用格式如下:y=diric(x,n)
clc
clear
close all
figure; clf;
t = -4*pi:pi/20:4*pi;
subplot(211); plot(t,sinc(t));
title('sinc'); grid on;
xlabel('t'); ylabel('sinc(t)');
subplot(212); plot(t,diric(t,5));
title('diric'); grid on;
xlabel('t'); ylabel('diric(t)');