*********************************This Problem has to be done in MatLab**********
ID: 664625 • Letter: #
Question
*********************************This Problem has to be done in MatLab****************
DTMF Synthesis: This lab is a simplified version of a DTMF system (code-decode pair) and taken from the DSP First’s laboratory project C.7.2
Problem 1:
Write a function dtmfdial, to implement a DTMF dialer defined in the reading material. The input to the function is a vector of numbers that may range between 1 and 12, with 1 to 10 corresponding to the digits (10 corresponds to 0), 11 being the * key, and 12 being the # key. The output should be a vector containing the DTMF tones, sampled at 8 kHz. The duration of the tones should be about 0.5 sec, and a silence of about 0.1 sec long should separate each tone pair.
Problem 2:
Write a function dtmfdecode, to implement a DTMF decoder. The input to the function is a vector containing the DTMF tones. The output should be a vector of numbers that may range between 1 and 12, with 1 to 10 corresponding to the digits (10 corresponds to 0), 11 being the * key, and 12 being the # key.
---------------------------------------------------------------------------------------------------------------------
To check if your functions work correctly or not, try code and decode the number 2568246316.
Explanation / Answer
function dtmf=dtmfdial([a b c d e],fs); %This function produces DTMF Tone corresponding to given %key number %abcdefg=input key numbers %fs= The sampling frequency fs=8000 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
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.