% Generate DTMF frequencies for analysis with the FFT
% 
% ELEC 470, R. Kozick, Spring 1998

dtmfr = [697, 770, 852, 941];  % DTMF row frequencies in Hz
dtmfc = [1209, 1336, 1477];    % DTMF column frequencies in Hz

Fs = 8192;      % Sampling frequency, in samples/sec
dt = 1/Fs;      % Sample spacing, in seconds
T = 0.5;        % Duration of DTMF signal
t = 0:dt:T;     % Sample times

% Generate the 12 DTMF signals with duration T

s1 = T*( cos(2*pi*dtmfr(1)*t) + cos(2*pi*dtmfc(1)*t) );
s2 = T*( cos(2*pi*dtmfr(1)*t) + cos(2*pi*dtmfc(2)*t) );
s3 = T*( cos(2*pi*dtmfr(1)*t) + cos(2*pi*dtmfc(3)*t) );
s4 = T*( cos(2*pi*dtmfr(2)*t) + cos(2*pi*dtmfc(1)*t) );
s5 = T*( cos(2*pi*dtmfr(2)*t) + cos(2*pi*dtmfc(2)*t) );
s6 = T*( cos(2*pi*dtmfr(2)*t) + cos(2*pi*dtmfc(3)*t) );
s7 = T*( cos(2*pi*dtmfr(3)*t) + cos(2*pi*dtmfc(1)*t) );
s8 = T*( cos(2*pi*dtmfr(3)*t) + cos(2*pi*dtmfc(2)*t) );
s9 = T*( cos(2*pi*dtmfr(3)*t) + cos(2*pi*dtmfc(3)*t) );
sa = T*( cos(2*pi*dtmfr(4)*t) + cos(2*pi*dtmfc(1)*t) );
s0 = T*( cos(2*pi*dtmfr(4)*t) + cos(2*pi*dtmfc(2)*t) );
sb = T*( cos(2*pi*dtmfr(4)*t) + cos(2*pi*dtmfc(3)*t) );


