Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions