can anyone tell me how to implement DTMF tone using matlab and i have to listen the tone

2 件のコメント

KSSV
KSSV 2016 年 10 月 3 日
Deema Hani
Deema Hani 2022 年 1 月 4 日
xK(t)=sin(2*3.4ft)+sin(2*3.4gt),
0<=t<=Td
1) Develop a function namde ss_(..)to produce the signal for one digit.The synatax of the function should be
x=ss_dtmf(n,t)

サインインしてコメントする。

 採用された回答

pavan chillapur
pavan chillapur 2016 年 10 月 3 日
編集済み: Stephen23 2016 年 10 月 3 日

4 投票

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
f = [];
for c=1:4,
for r=1:3,
f = [ f [lfg(c);hfg(r)] ];
end
end
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:12,
% 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', ...
'FitBoxToText','on');

7 件のコメント

mohit saxena
mohit saxena 2018 年 8 月 30 日
on executing this program we are able to get the plot of time response of each tone of telephone pad but unable to get listen the tone. Furthermore how can I verify the obtained waveforms?
Divyanshu Singh
Divyanshu Singh 2019 年 10 月 15 日
編集済み: Divyanshu Singh 2019 年 10 月 15 日
The coding provided by Pavan has many errors in it... I'll send the correct code...
Divyanshu Singh
Divyanshu Singh 2019 年 10 月 15 日
編集済み: Divyanshu Singh 2019 年 10 月 15 日
if true
% code
end
symbol = {'1','2','3','4','5','6','7','8','9','*','0','#'};
lfg = [697, 770, 852, 941];
hfg = [1209, 1336, 1477];
f = [];
for c = 1:4
for r = 1:3
f = [f [lfg(c); hfg(r)]];
end
end
Fs = 8000;
N = 800;
t = (0:N-1)/Fs;
pit = 2*pi*t;
tones = zeros(N, size(f,2));
for toneChoice = 1:12
tones(:,toneChoice) = sum(sin(f(:,toneChoice)*pit));
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', 'FitboxToText', 'on');
VIJAY CHANDRA
VIJAY CHANDRA 2020 年 11 月 17 日
how to execute the code in matlab
Muhammet Furkan Nargül
Muhammet Furkan Nargül 2020 年 11 月 19 日
Thank you!
EHTEZAZ ALI HASSAN
EHTEZAZ ALI HASSAN 2021 年 1 月 23 日
no sound man
ammar ansari
ammar ansari 2021 年 6 月 19 日
For sound you can use the code
keypad = tones(:,5),Fs,16; % 5 is button pressed on keypad
sound(keypad)
If multiple button on keypad are pressed like (5086477000) then
for i = [5 11 8 6 4 7 7 11 11 11]
p = audioplayer(tones(:,i),Fs,16);
play(p)
pause(0.5)
end

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Applications についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by