dtmf_tones = load('Eng Abeer dtmf.mat'); xr = dtmf_tones.R; fs = dtmf_tones.fs; x = xr - mean(xr); % Remove d-c Component [S,F,T] = spectrogram(x, 1536, 64, 512, fs, 'yaxis'); % Fm = repmat(F, 1, length(T)); % Tm = repmat(T, length(F), 1); % figure(2) % surf(Fm, Tm, abs(S)) % xlabel('Frequency') % ylabel('Time') % axis([0 2000 ylim zlim]) % grid on Sa = abs(S); [r, c] = find(Sa >= 20); 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 if size(FrqTime{k1},1) > 2 FrqTime{k1} = [FrqTime{k1}(1,:); mean(FrqTime{k1}(2:end,:))]; % If MoreThan 2 Rows, Second Row Is Mean Of Last 2 Rows end end FrqTime{1:10} 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
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.