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

📄 dtmfcut.m

📁 很多matlab的源代码
💻 M
字号:
function [nstart,nstop] = dtmfcut(xx,fs)%DTMFCUT   find the DTMF tones within x[n]%%  usage:%       indx = dtmfmain(xx,fs)%%   length of nstart = M = number of tones found%      nstart is the set of STARTING indices%      nstop is the set of ENDING indices%    xx = input signal vector%    fs = sampling frequency  %%  Looks for silence regions which must at least 10 millisecs long.%  Also the tones must be longer than 100 msecxx = xx(:)'/max(abs(xx));   %-- normalize xxLx = length(xx);Lz = round(0.01*fs);setpoint = 0.02;      %-- make everything below 2% zeroxx = filter( ones(1,Lz)/Lz, 1, abs(xx) );xx = diff(xx>setpoint);jkl = find(xx~=0)';%%%xx(jkl)if xx(jkl(1))<0, jkl = [1;jkl];  endif xx(jkl(end))>0, jkl = [jkl;Lx]; endjkl';indx = [];while length(jkl)>1	if jkl(2)>(jkl(1)+10*Lz)		indx = [indx, jkl(1:2)];	end	jkl(1:2) = [];endnstart = indx(1,:);nstop = indx(2,:);

⌨️ 快捷键说明

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