亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dtmfdemo.m

?? code matlab of program used to do the dfmtf, multitone detection in matlab. DSP Applications
?? M
字號:
%% Dual-Tone Multi-Frequency (DTMF) Signal Detection
% This demonstration showcases the use of the Goertzel function as a part
% of a DFT-based DTMF detection algorithm.
% 
% Dual-tone Multi-Frequency (DTMF) signaling is the basis for voice
% communications control and is widely used worldwide in modern telephony
% to dial numbers and configure switchboards. It is also used in systems
% such as in voice mail, electronic mail and telephone banking.
%
% <<phonepad.png>>

%   Copyright 1988-2005 The MathWorks, Inc.
%   $Revision: 1.1.6.5 $  $Date: 2005/11/18 14:22:43 $

%% Generating DTMF Tones
% A DTMF signal consists of the sum of two sinusoids - or tones - with
% frequencies taken from two mutually exclusive groups. These frequencies
% were chosen to prevent any harmonics from being incorrectly detected
% by the receiver as some other DTMF frequency. Each pair of tones
% contains one frequency of the low group (697 Hz, 770 Hz, 852 Hz, 941 Hz)
% and one frequency of the high group (1209 Hz, 1336 Hz, 1477Hz) and
% represents a unique symbol. The frequencies allocated to the push-buttons
% of the telephone pad are shown below:
%
%                          1209 Hz   1336 Hz   1477 Hz   
%                         _ _ _ _ _ _ _ _ _ _ _ _ _ _ _    
%                        |         |         |         |  
%                        |         |   ABC   |   DEF   |  
%                697 Hz  |    1    |    2    |    3    |     
%                        |_ _ _ _ _|_ _ _ _ _|_ _ _ _ _|  
%                        |         |         |         | 
%                        |   GHI   |   JKL   |   MNO   |  
%                770 Hz  |    4    |    5    |    6    |       
%                        |_ _ _ _ _|_ _ _ _ _|_ _ _ _ _|   
%                        |         |         |         |  
%                        |   PRS   |   TUV   |   WXY   |  
%                852 Hz  |    7    |    8    |    9    |         
%                        |_ _ _ _ _|_ _ _ _ _|_ _ _ _ _|   
%                        |         |         |         |  
%                        |         |         |         |  
%                941 Hz  |    *    |    0    |    #    |       
%                        |_ _ _ _ _|_ _ _ _ _|_ _ _ _ _|  
%                                                           
% First, let's generate the twelve frequency pairs
clear all;

errores=[];
eje_x=10:-10:-80; %rango de valores de SNR
% SNR=-20;
for SNR=eje_x,
error_SNR=[];
    for contador=1:10, %numero de iteraciones para cada SNR

symbol = {'1','2','3','4','5','6','7','8','9','*','0','#'};
lfg = [697 770 852 941]; % Low frequency group
hfg = [1209 1336 1477];  % High frequency group
f0  = [];
f   = [];
for c=1:4,
    for r=1:3,
        f0 = [ f0 [lfg(c);hfg(r)] ];
    end;
end;
anhadir=[[lfg(1);hfg(1)] [lfg(1);hfg(2)] [lfg(1);hfg(3)] [lfg(2);hfg(1)]];
f = [f0 f0 f0 f0 f0 f0 f0 f0 anhadir];
[fil col]=size(f);
%%
% Next, let's generate and visualize the DTMF tones
Fs  = 8000;       % Sampling frequency 8 kHz
N = 800;          % Tones of 100 ms
t   = (0:N-1)/Fs; % 800 samples at Fs
pit = 2*pi*t;

tones = zeros(N,size(f,2));
for toneChoice=1:col,
    % Generate tone
    tones(:,toneChoice) = sum(sin(f(:,toneChoice)*pit))';
    % Plot tone
%     subplot(4,3,toneChoice),plot(t*1e3,tones(:,toneChoice));
%     title(['Symbol "', symbol{toneChoice},'": [',num2str(f(1,toneChoice)),',',num2str(f(2,toneChoice)),']'])
%     set(gca, 'Xlim', [0 25]);
%     ylabel('Amplitude');
%     if toneChoice>9, xlabel('Time (ms)'); end
end
%  set(gcf, 'Color', [1 1 1], 'Position', [1 1 1280 1024])
% annotation(gcf,'textbox', 'Position',[0.38 0.96 0.45 0.026],...
%     'EdgeColor',[1 1 1],...
%     'String', '\bf Time response of each tone of the telephone pad', ...
%     'FitHeightToText','on');

%% Playing DTMF Tones
% Let's play the tones of phone number 508 647 7000 for example. Notice
% that the "0" symbol corresponds to the 11th tone.
 %for i=[5 11 8 6 4 7 7 11 11 11],
 %    p = audioplayer(tones(:,i),Fs);
 %    play(p)
 %    pause(0.5)
 %end
 
%% Estimating DTMF Tones with the Goertzel Algorithm
% The minimum duration of a DTMF signal defined by the ITU standard is 40
% ms. Therefore, there are at most 0.04 x 8000 = 320 samples available for
% estimation and detection. The DTMF decoder needs to estimate the
% frequencies contained in these short signals. 
%
% One common approach to this estimation problem is to compute the
% Discrete-Time Fourier Transform (DFT) samples close to the seven
% fundamental tones. For a DFT-based solution, it has been shown that using
% 205 samples in the frequency domain minimizes the error between the
% original frequencies and the points at which the DFT is estimated.
Nt = 205;
original_f = [lfg(:);hfg(:)];  % Original frequencies
%%
k = round(original_f/Fs*Nt);  % Indices of the DFT
estim_f = round(k*Fs/Nt);      % Frequencies at which the DFT is estimated
%%
% To minimize the error between the original frequencies and the points at
% which the DFT is estimated, we truncate the tones, keeping only 205
% samples or 25.6 ms for further processing.
tones = tones(1:205,:);

%anhadir ruido a la sehal
%%%%%%%%%% prueba con rand
% x=rand(size(tones));
% tones =sqrt(x)+tones;
%%%%%%%%%%%%%%%%%%%%

 x1=auread ('male_voice.au');
 x2=auread ('female_voice.au');
for i=1:col,
tones(:,i)=tones(:,i)+x2(1:205);
end;

tones= awgn (tones,SNR); % ruido anhadido 
%%
% At this point we could use the Fast Fourier Transform (FFT) algorithm to
% calculate the DFT. However, the popularity of the Goertzel algorithm in this
% context lies in the small number of points at which the DFT is estimated.
% In this case, the Goertzel algorithm is more efficient than the FFT algorithm.
%
% Plot Goertzel's DFT magnitude estimate of each tone on a grid
% corresponding to the telephone pad.
% figure,
numeros=[];
num=0;
% validity=zeros(1,12);
for toneChoice=1:col,
    % Select tone
    tone=tones(:,toneChoice);
    % Estimate DFT using Goertzel
    ydft(:,toneChoice) = goertzel(tone,k+1); % Goertzel use 1-based indexing
    % Plot magnitude of the DFT
%     subplot(4,3,toneChoice),stem(estim_f,abs(ydft(:,toneChoice)));
%     title(['Symbol "', symbol{toneChoice},'": [',num2str(f(1,toneChoice)),',',num2str(f(2,toneChoice)),']'])
%     set(gca, 'XTick', estim_f, 'XTickLabel', estim_f, 'Xlim', [650 1550]);
%     ylabel('DFT Magnitude');
%     if toneChoice>9, xlabel('Frequency (Hz)'); end;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%validity checking
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% One_tone=abs(ydft(:,toneChoice));
% [valor1,max1]=max(One_tone);
% One_tone(max1)=0;
% M1=estim_f(max1);
% [valor2,max2]=max(One_tone);
% One_tone(max2)=0;
% M2=estim_f (max2);
% [valor3,max3]=max(One_tone);
% M3=estim_f (max3);
% cond1=0;cond2=0;cond3=0;T1=30;T2=.6;
% if ((M1 > 1000) & (M2 <1000))|((M2 > 1000) & (M1 <1000)),cond1=1;end;
% if (abs(M2))> T1, cond2=1; end;
% if (M2/M3)>T2, cond3=1; end;
% if (cond1==1)&(cond2==1)&(cond3==1),validity(toneChoice)=1; end;
%end;
% validity
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Detecting DTMF Tones
% The digital tone detection can be achieved by measuring the energy 
% present at the seven frequencies estimated above. Each symbol can be
% separated by simply taking the component of maximum energy in the lower
% and upper frequency groups.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
One_tone=abs(ydft(:,toneChoice));
[valor1,max1]=max(One_tone);
One_tone(max1)=0;
M1=estim_f(max1);
[valor2,max2]=max(One_tone);
One_tone(max2)=0;
M2=estim_f (max2);
if ((M1==702)&(M2==1210))|((M2==702)&(M1==1210)), num=1;
elseif ((M1==702)&(M2==1327))|((M2==702)&(M1==1327)), num=2;
elseif ((M1==702)&(M2==1483))|((M2==702)&(M1==1483)), num=3;
elseif ((M1==780)&(M2==1210))|((M2==780)&(M1==1210)), num=4;
elseif ((M1==780)&(M2==1327))|((M2==780)&(M1==1327)), num=5;
elseif ((M1==780)&(M2==1483))|((M2==780)&(M1==1483)), num=6;
elseif ((M1==859)&(M2==1210))|((M2==859)&(M1==1210)), num=7;
elseif ((M1==859)&(M2==1327))|((M2==859)&(M1==1327)), num=8;
elseif ((M1==859)&(M2==1483))|((M2==859)&(M1==1483)), num=9;
elseif ((M1==937)&(M2==1210))|((M2==937)&(M1==1210)), num=10;
elseif ((M1==937)&(M2==1327))|((M2==937)&(M1==1327)), num=11;
elseif ((M1==937)&(M2==1483))|((M2==937)&(M1==1483)), num=12;
else num=20; 
end;

numeros=[numeros num];
end;

numeros;
a= [1 2 3 4 5 6 7 8 9 10 11 12];
correctos=[a a a a a a a a 1 2 3 4];
error=length(find(correctos-numeros)); %errores en una secuencia de 100 tonos
error_SNR= [error_SNR error]; %errores en 10 iteraciones para una SNR dada
end;
% error_grafica
promedio_error_SNR= sum(error_SNR(1:end))/(length(error_SNR));
errores=[errores promedio_error_SNR];
end;

figure;
% plot (eje_x,error_grafica); 
plot(eje_x,errores); grid;
title('Probability of false detection');
ylabel('% error');
xlabel ('SNR (dB)');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set(gcf, 'Color', [1 1 1], 'Position', [1 1 1280 1024])
% annotation(gcf,'textbox', 'Position',[0.28 0.96 0.45 0.026],...
%     'EdgeColor',[1 1 1],...
%     'String', '\bf Estimation of the frequencies contained in each tone of the telephone pad using Goertzel', ...
%     'FitHeightToText','on');





?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品久久一线不卡| 欧美撒尿777hd撒尿| 26uuu色噜噜精品一区二区| 日韩vs国产vs欧美| 欧美成人精品3d动漫h| 国产中文字幕精品| 亚洲国产高清不卡| 99re成人精品视频| 亚洲一区二区三区视频在线 | 美国三级日本三级久久99| 91精品国产麻豆国产自产在线| 日本va欧美va瓶| 久久久天堂av| 色系网站成人免费| 免费欧美在线视频| 久久精品欧美日韩| 一本色道亚洲精品aⅴ| 三级一区在线视频先锋 | 美女一区二区视频| 国产农村妇女精品| 色哟哟亚洲精品| 麻豆精品一区二区av白丝在线| 国产嫩草影院久久久久| 在线观看亚洲精品视频| 久久99国内精品| 中文字幕中文字幕一区| 欧美精品亚洲一区二区在线播放| 久久 天天综合| 亚洲欧美日韩在线不卡| 日韩情涩欧美日韩视频| 成人深夜福利app| 日韩国产欧美一区二区三区| 中文乱码免费一区二区| 欧美夫妻性生活| caoporm超碰国产精品| 日韩精品国产精品| 国产精品久久一卡二卡| 日韩亚洲欧美中文三级| 一本色道久久综合亚洲精品按摩 | 欧美激情在线免费观看| 欧美日韩国产免费一区二区 | 国产情人综合久久777777| 欧美视频中文字幕| 成人午夜精品在线| 免费三级欧美电影| 亚洲电影第三页| 中文字幕不卡在线播放| 欧美大片在线观看一区| 欧美视频三区在线播放| 成人激情动漫在线观看| 黄页视频在线91| 丝袜a∨在线一区二区三区不卡| 中文字幕欧美日韩一区| 欧美大白屁股肥臀xxxxxx| 在线观看日韩精品| heyzo一本久久综合| 国产乱色国产精品免费视频| 五月婷婷综合在线| 一区二区三区av电影| 中文子幕无线码一区tr| 欧美白人最猛性xxxxx69交| 色婷婷精品久久二区二区蜜臀av | 欧美色视频在线观看| 国产成人av电影在线| 美女精品一区二区| 日本在线不卡一区| 同产精品九九九| 亚洲1区2区3区视频| 亚洲国产日韩精品| 亚洲人成网站色在线观看 | 亚洲欧洲精品一区二区三区 | 欧美夫妻性生活| 欧美日韩中字一区| 欧美午夜精品久久久| 91黄色在线观看| 91捆绑美女网站| 91在线国内视频| 91在线视频播放地址| 99久久99久久精品免费观看| 成人国产免费视频| 91啪在线观看| 在线观看视频一区二区欧美日韩| 91免费观看视频在线| 日本道精品一区二区三区| 欧洲精品视频在线观看| 欧美在线一二三四区| 欧美日韩国产小视频在线观看| 在线视频综合导航| 欧美日韩国产在线观看| 欧美一级黄色片| 欧美国产欧美综合| 亚洲三级在线观看| 亚洲精品乱码久久久久久日本蜜臀 | 石原莉奈在线亚洲二区| 日本 国产 欧美色综合| 极品少妇xxxx偷拍精品少妇| 国产黄人亚洲片| 99麻豆久久久国产精品免费 | 91蜜桃婷婷狠狠久久综合9色| 99国产精品久久久久久久久久久| 色婷婷激情综合| 69堂精品视频| 2019国产精品| 亚洲欧美色图小说| 日韩av电影一区| 国产麻豆精品95视频| 99精品偷自拍| 欧美一卡二卡三卡| 国产精品网站导航| 日韩精品视频网| 风流少妇一区二区| 欧美日韩色综合| 久久日韩精品一区二区五区| 中文字幕永久在线不卡| 丝袜脚交一区二区| 高清不卡在线观看| 欧美另类高清zo欧美| 国产亚洲一本大道中文在线| 一区二区三区中文免费| 麻豆精品久久久| 99国产精品久久久久久久久久 | 91精品国产全国免费观看| 国产视频不卡一区| 婷婷夜色潮精品综合在线| 国产xxx精品视频大全| 欧美日本视频在线| 国产精品成人免费在线| 琪琪久久久久日韩精品| 91视频一区二区三区| 2024国产精品| 性欧美疯狂xxxxbbbb| 不卡电影一区二区三区| 欧美变态tickling挠脚心| 亚洲一区免费在线观看| 成人免费毛片高清视频| 日韩三区在线观看| 亚洲一区二区三区视频在线 | 91国模大尺度私拍在线视频| 精品国产一区二区在线观看| 亚洲福利一区二区三区| 成人动漫一区二区| 26uuu另类欧美| 日韩高清电影一区| 欧美性色aⅴ视频一区日韩精品| 国产日韩亚洲欧美综合| 久色婷婷小香蕉久久| 欧美日韩一区不卡| 亚洲激情综合网| av电影在线观看一区| 国产亚洲制服色| 激情综合色综合久久| 精品美女一区二区| 三级欧美在线一区| 欧美精品丝袜中出| 亚洲亚洲精品在线观看| 一本久久精品一区二区| 国产精品免费视频一区| 国产不卡在线一区| 中文字幕第一区综合| 国产一区二区不卡老阿姨| 精品国产乱子伦一区| 久久精品理论片| 日韩女优制服丝袜电影| 免费在线视频一区| 日韩一级大片在线| 蓝色福利精品导航| 精品日韩欧美在线| 经典三级视频一区| 久久嫩草精品久久久精品| 九色综合狠狠综合久久| 欧美精品一区二区三区四区| 狠狠色狠狠色合久久伊人| 久久女同互慰一区二区三区| 国产一区高清在线| 国产欧美日韩另类一区| 懂色一区二区三区免费观看| 国产精品丝袜在线| 91网页版在线| 亚洲国产精品自拍| 91精品国产综合久久香蕉麻豆| 石原莉奈一区二区三区在线观看| 日韩一级大片在线| 国产黑丝在线一区二区三区| 国产精品青草久久| 91久久久免费一区二区| 亚洲国产成人av好男人在线观看| 欧美精品少妇一区二区三区| a级高清视频欧美日韩| 国产精品高潮久久久久无| 色999日韩国产欧美一区二区| 亚洲一区二区综合| 日韩一级片在线播放| 国产激情91久久精品导航| 亚洲欧美自拍偷拍色图| 欧美三区免费完整视频在线观看| 人人爽香蕉精品| 国产精品免费人成网站| 欧美日韩中文一区| 国内精品视频666| 亚洲男人的天堂网|