資源簡介
這是一個基于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算法濾波完整程序
評論
共有 條評論