Question: Matlab exercise: Ask user to enter input data. Also, ask user to choose one of the three window functions as defined below. Generate window vector

Matlab exercise: Ask user to enter input data. Also, ask user to choose one of the three window functions as defined below. Generate window vector (same length as the input data vector) and multiply it by the input data vector to get windowed-input data vector. Plot both the input data vector and windowed-input data vector in a single plot using two subplots. Triangular Window:wtri(n) = 1 - [(abs(2n-N+1)/(N-1)] Hamming Window: whm(n) = 0.54 - 0.46cos((2*pi*n)/(N-1)) Hanning Window: whn(n) = 0.5 - 0.5cos((2*pi*n)/(N-1)) Note that for each of the window function, N is the length of the vector which is the same as the length of the input data vector, and n = 0, 1, 2, 3, , N-1. data vector y = 2sin(2000 *((pi*n)/8000)), where n is 0, 1, 2, 3,........,99.

Must use switch command for this exercise.

Thanks for any assistance.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!