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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started