|
楼主 |
发表于 2011-4-26 15:34
|
显示全部楼层
本帖最后由 牛小贱 于 2015-3-31 09:21 编辑
附程序:请各位看看
- clear all;
- close all;
- clc;
- % -------------------------------------------------------------------------
- % 设置参数
- % -------------------------------------------------------------------------
- fs=256;
- f0=1;
- fm=17;
- T=64; %时间长度
- C=1/T *log(fm/f0);
- t=0:1.0/fs:T-1.0/fs;
- x=sin(((2*pi*f0)/C).*(exp(C*t)-1)); %扫频信号
- figure(1);
- plot(t,x);
- xlabel('Time[sec]');
- ylabel('Amplitude');
- % -------------------------------------------------------------------------
- %脉冲响应函数
- gamma=[0.005,0.05,0.005,0.05,0.005,0.05] %阻尼比
- omega=2*pi.*[4,6,8,10,12,14] %频率
- h=0;
- for k=1:6
- h=h+exp((-gamma(k)+i*sqrt(1-gamma(k)^2))*omega(k)*t);
- end
复制代码
|
|