Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use MATLAB to obtain these answers. 3. (a) Use Matlab to generate and plot the discrete-time signal r[n] = sin (won) for the following

Please use MATLAB to obtain these answers.

image text in transcribed

image text in transcribed

3. (a) Use Matlab to generate and plot the discrete-time signal r[n] = sin (won) for the following values of uo. 8888 88 8 87 88 8 Plot each signal for 0n 63. Label each graph with the frequency Use the subplot function to plot four graphs per figure Here is some code that will do all of this. You can type the in ie-by-line at d prompt or you can create an m-file. % P3a % plot a bunch of discrete-time sine signals % The frequency will be w-k*pi/8 % Load up the k's into a vector: kvals = [-29-3-1 1 3 5 7 9 13 15 33 211; % make a counter to index the "next" k to use: next k 1 n 0:63 % the time variable % There are 12 k values. We will plot four per % figure. So we will need three figures all % together. Loop on figures for Fig num-1:3 figure (Fig-num); % selects the "current" figure % each time through this loop, we are going to do % 4 of the k's. Loop on Sub Figure number for SubFig_num-1:4 k = kvals (next-k) ; next-k = next-k + 1; % the frequency xn = sin(w*n) ; subplot (4,1,SubFig num); stem(n,xn); title (sprintf ( %d%s", k, , \pi/89) ; end % for SubF18-num end % for Fig-num 3. (a) Use Matlab to generate and plot the discrete-time signal r[n] = sin (won) for the following values of uo. 8888 88 8 87 88 8 Plot each signal for 0n 63. Label each graph with the frequency Use the subplot function to plot four graphs per figure Here is some code that will do all of this. You can type the in ie-by-line at d prompt or you can create an m-file. % P3a % plot a bunch of discrete-time sine signals % The frequency will be w-k*pi/8 % Load up the k's into a vector: kvals = [-29-3-1 1 3 5 7 9 13 15 33 211; % make a counter to index the "next" k to use: next k 1 n 0:63 % the time variable % There are 12 k values. We will plot four per % figure. So we will need three figures all % together. Loop on figures for Fig num-1:3 figure (Fig-num); % selects the "current" figure % each time through this loop, we are going to do % 4 of the k's. Loop on Sub Figure number for SubFig_num-1:4 k = kvals (next-k) ; next-k = next-k + 1; % the frequency xn = sin(w*n) ; subplot (4,1,SubFig num); stem(n,xn); title (sprintf ( %d%s", k, , \pi/89) ; end % for SubF18-num end % for Fig-num

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

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

=+ (b) Define a set function v, on , by (11.6) "o (f, g] = A(g-f).

Answered: 1 week ago