Question: 1. Write an M-file called tone.m to generate a pure tone of 3 secs duration at middle C. Use a sampling frequency 8 KHz. Your

1. Write an M-file called tone.m to generate a pure tone of 3 secs duration at middle C. Use a sampling frequency 8 KHz. Your program should play the signal through the sound system using the sound command and it should plot the first N signal samples vs time (use N-300). Start your program by clearing the workspace and then assign values to the following variables: Fs - sampling frequency in Hz f - tone frequency Hz w - tone frequency rad/sec T - duration of signal t - vector of sample times Amp - amplitude of tone ph - phase of tone x - the vector of signal values N - no. of samples to be plotted Make sure your plot displays a grid, has the axes correctly labelled, and is given a title. 2. What do you get if you try to plot to whole signal vs time. Explain
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
