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...
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.
MATLAB please make it simple as possible P4.1.9 Write a script that displays in a single figure window a plot of the functions x, x2, x3, x4, and x5 across the interval [0, 1].
Question 2 Problem Definition Write a MATLAB script that uses nested loops to create a 100 by 100 element 2D array representing an image that shades from white at the top to black at the bottom. Your script should save the image in a file called test2.png. Testing The image file produced should be shaded from white at the top of the image to black at the bottom of the image like SO: Coding Write your code in a MATLAB...
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...
Write a MATLAB script, using either a single or nested for-loop, that will print the factorials for the numbers between 1 and 100 (inclusive). The factorial of n (n!) is the product of the positive integers less than or equal to n. For example: 3! = 3 * 2 * 1. For this question you cannot use the built-in MATLAB factorial function, but you can use other MATLAB functions if you wish. MATLAB code!MATLAB code!MATLAB code!MATLAB code!
Flowcharts & for loops 1. Using a for loop, write a MatLab script to convert ounces to grams for 0 to 16 ounces, in 1-ounce increments. Present output in a table; label columns appropriately. 2. A Fibonacci sequence is composed of elements created by adding the previous 2 elements. The simplest Fibonacci sequence starts with 1, 1 and proceeds as follows: 1,1,2,3,5,8… Element 3 is the sum of elements 1 and 2 (1+1=2) Element 4 is the sum of elements...
Create a new MATLAB Script file named MT3P3_itname.m. In your script file perform the following calculations: Prompt the user to enter an integer. Use a multiple if-elseif structure to determine the following: Confirm that the number is an integer. If not, the program displays message 1. Check if the number is divisible by 2 and displays message 2. Check if the number is divisible by 3 and displays message 3. For anything other than 1, 2, or 3, the program...
Problem 5 (10 points): MATLAB script-5 Write a script that will accept a single variable named S. The script should replace S with the square of S and repeat this process until S is either greater than 1015 or less than 1015. The script should return a value Q containing the number of times S was squared during the process. If S equals 1, the function should display a warning message and retun the value of Inf for Q Examples:...
PLEASE USE MATLAB Create a single MatLab script that On a single line (Line 1), defines matrix A such that A = 1 2 4. 5 7 8 Suppress the echo of A. On a single line (Line 2), use the size function to echo the size of A. On a single line (Line 3), use the length function to echo the length of the entire first row of A. On a single line (Line 4), use linear index notation...
Problem 2. Write a MATLAB script that uses nested loop statements to print the following multiplication table. 4 8 12 16 5 10 15 20 25