Create a signal, sampled at 4 kHz, that resembles dialing all the keys of a digital telephone. Save the signal as a MATLAB® timetable.
fs = 4e3; t = 0:1/fs:0.5-1/fs; ver = [697 770 852 941]; hor = [1209 1336 1477]; tones = []; for k = 1:length(ver) for l = 1:length(hor) tone = sum(sin(2*pi*[ver(k);hor(l)].*t))'; tones = [tones;tone;zeros(size(tone))]; end end % To hear, type soundsc(tones,fs) S = timetable(seconds(0:length(tones)-1)'/fs,tones);
Open Signal Analyzer and drag the timetable to a display. Click Time-Frequency to add a spectrogram view. On the Spectrogram tab, under Time Resolution, select Specify. Enter a time resolution of 0.5 second and zero overlap between adjoining segments.
The spectrogram view shows that each key is dialed for half a second, with half-second silent pauses between keys. The first tone has its frequency content concentrated around 697 Hz and 1209 Hz, corresponding to the digit '1'
in the DTMF standard.