matlab 序列的类型

来源:互联网 发布:建材网络推广 编辑:程序博客网 时间:2024/06/11 20:31

                                          序列的类型

单位采样序列:
          抽样函数的频谱:
 x = -25 :0.05:25; y = sin(x)./x;plot(x, y);
matlab 仿真后结果:

下面给出单位冲激函数的实现方法:
%matlab program 注释部分%creat  adeta 函数n0 = 0;n1 = -10;n2 = 10;n = [n1:n2]; %表示横坐标x = [(n-n0)==0];stem(n, x);xlabel('n');%横纵坐标ylabel('x(n)');title('Delta Sequence');%标题grid;%网格化

仿真结果:
随机序列产生:
%产生随机序列n = [1:10];x = rand(1, 10);subplot(211);stem(n, x);n = [1:10];x = rand(1, 10);subplot(212);stem(n, x);

matlab 仿真如下:



0 0