资源简介
这是一个基于gabor原子的时频分析程序,值得大家参考学习
代码片段和文件信息
% ATTENTION: it‘s maybe not possible to construct the dictionary at one time and to use it forever.
% because the memory is so limited compared with the memory needed.
clc
clear
%bat=(1/sqrt(280))*exp(-pi*((t-200)/280).*((t-200)/280)).*cos(18*((t-200)/280));
t=0:1/256:1;
%bat=sin(2*pi*(50*t+50*t.^2/2))+sin(2*pi*(100*t-50*t.^2/2));
bat=sin(2*pi*40*t)+sin(2*pi*40*t+pi/6);
% the matching pursuit processing iterative number
iterative_number=10;
[aN]=size(bat);
signal_reconstruct=zeros(1N);
signal_r=bat;
%%%%%%确定参数
a_base=2;
j_min=0; %?or j=1
j_max=log2(N);
% the transmission or displacement u should determined as following
u_base=1/2;
p_min=0;
% p_max can be determined by its relationship with j
% the frequency v
v_base=pi;
k_min=0;
% k_max can be determined by its relationship with j;
% the phase w
w_base=pi/6;
i_min=0;
i_max=12;
% the matching pursuit process
gaborcanshu=zeros(iterative_number4);%储存最佳原子的参数
gbest=zeros(iterative_numberN);%储存最佳原子
garxi=zeros(iterative_number1);%储存最佳原子的系数
for n=1:iterative_number
% the following program uses one subroutine to select the best atom;
[projscaletranslationfreqphase]=select_best(signal_rNa_basej_minj_maxu_basep_minv_basek_minw_basei_mini_max);
%reconstruct the best atom from the parameters gotted by abo
- 上一篇:MATLAB频域积分
- 下一篇:基于MATLAB的LMS和RLS算法滤波完整程序
评论
共有 条评论