⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 est_d.m

📁 该工具箱为时频分析中的一类重要变换,离散时频分布的工具箱,其中提供基本算法的程序.可直接应用
💻 M
字号:
function d = est_d(x, t, f, c, M, dlow, dhigh)% est_d -- Estimate the duration.%%  Usage%    d = est_d(x, t, f, c, M, dlow, dhigh)%%  Inputs%    x      signal vector%    t      current estimate of the location in time%    f      current estimate of the location in frequency%    c      current estimate of the chirp rate%    M      number of points in the grid (optional, default is 64)%    dlow   lowest value of the duration (optional, default is 0.25)%    dhigh  highest value of the duration (optional, default is M/2)%%  Outputs%    d      duration%% Given the current estimates of the location in time and frequency and% chirp rate, estimate the duration using a grid search on the % likelihood function.% Copyright (C) -- see DiscreteTFDs/Copyrightx = x(:);N = length(x); error(nargchk(4, 7, nargin));if (nargin < 5)  M = 64;endif (nargin < 6)  dlow = 0.25;endif (nargin < 7)  dhigh = M/2;end% center in time and window% should probably use a non-rectangular window -> gaussian, hamming etc.MM = M/2-1;if (t-MM < 1)  x = [zeros(MM-t+1,1) ; x(1:t+MM)];elseif (t+MM > N)  x = [x(t-MM:N) ; zeros(MM-N+t,1)];else  x = x(t-MM:t+MM);end% create functions corresponding to all possible values of dy = zeros(M-1,M);dd = linspace(dlow, dhigh, M);for i=1:M,  y(:,i) = chirplets(M-1,[1 M/2 f c dd(i)]);  y(:,i) = y(:,i)/norm(y(:,i));end% find the d that gives the maximum of the likelihood functionA = abs(x'*y);[m i] = max(A);d = dd(i);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -