Write a Matlab script that
1. Uses your computer’s audio device to record a single DTMF tone as generated by a cell phone (or an app).
2. Decodes and displays the number associated with the recorded tone.
1. symbol = {'1','2','3','4','5','6','7','8','9','*','0','#'}; [tones, Fs, f, lfg, hfg] = helperDTMFToneGenerator(symbol, false); helperDFTEstimationPlot1(tones, symbol, Fs, f);
Here is the matlab script for the given question:
2. pc = load('phonecall.mat');
x = pc.x;
fs = pc.fs;
% [S,F,T] = spectrogram(x, 1024, 512, 256*3, fs, 'yaxis');
[S,F,T] = spectrogram(x, 1024, 512*3/4, 256*3, fs, 'yaxis');
Sa = abs(S);
[r, c] = find(Sa >= 30);
Fr = F(r);
Tc = T(c)';
FT = [Tc Fr];
[C, ia, ic] = unique(FT(:,1)); % Find Unique Times
for k1 = 1:size(C,1) % Create Cell Array By Time
FrqTime{k1} = FT(FT(:,1) == C(k1),:); % Time & Frequency Cell
end
original_f = [697 770 852 941 1209 1336 1477]; % DTMF Frequencies
dtmf_dcd = [1 5; 1 6; 1 7; 2 5; 2 6; 2 7; 3 5; 3 6; 3 7; 4 5; 4 6; 4 7]; % Combination Codes w.r.t. ‘original_f’
nbr_map = ['1' '2' '3' '4' '5' '6' '7' '8' '9' '*' '0' '#']; % Number Key Map
for k1 = 1:size(C,1)
freq_dist = abs(bsxfun(@minus, FrqTime{k1}(:,2), original_f)); % Distance Of ‘FrqTime’ Frequencies From ‘original_f’ Frequencies
[~,freq_pos(:,k1)] = min(freq_dist,[],2); % Frequency Positions Of ‘FrqTime’ In ‘original_f’
num_pad(k1) = nbr_map(ismember(dtmf_dcd, freq_pos(:,k1)', 'rows')); % Map To Number Key Pad
end
Write a Matlab script that 1. Uses your computer’s audio device to record a single DTMF tone as generated by a cell phone (or an app). 2. Decodes and displays the number associated with the recorded t...
Write a Matlab script that 1. Uses your computer’s audio device to record a single DTMF tone as generated by a cell phone (or an app). 2. Decodes and displays the number associated with the recorded tone.
Task 3: Image Scaling 3D Array Indexing Write a MATLAB script which reads an image file with imread ), uses matrix indexing to scale the mage down by a factor of 1/10th, then displays the result with image () . You may use any image of your choosing. able on Blackboard. i doubt, the mage used in lectures is avail Task 3: Image Scaling 3D Array Indexing Write a MATLAB script which reads an image file with imread ), uses...
In Matlab Create a single script (.m file) to solve these problems. Unless directed otherwise, use meaningful variable names for each variable; do not use the default variable ans to store your results. For this project, suppress your output with semi-colons (;). Each problem should be in a separate cell, using the cell mode feature of MATLAB. Problem 4 Video games are rather complicated to program, not least of which because of the graphics work that needs to be completed...