Use MATLAB to create an arbitrary sample rate changer using the block diagram of
ID: 2320113 • Letter: U
Question
Use MATLAB to create an arbitrary sample rate changer using the block diagram of, where L = 10 and M = 3. In doing so, perform the following steps: a. Plot the signal x[n] = cos(pi n) for n = 0, 1, 2, ..., 9. b. Up-sample x[n] by a factor of L = 10 and plot the resulting up-sampled signal, a[n]. c. Design an appropriate ideal low-pass filter whose impulse response Ls truncated to the range of [-20, 20], i.e., 41 samples in length, that will result in no aliasing in the output signal. Write an expression for the impulse response and indicate the chosen cutoff frequency, omega_c. Then, plot the impulse response of the filter, h[n]. d. Apply the filter h[n] to the up-sampled signal a[n] using the MATLAB conv function and plot the resulting interpolated signal, b[n]. e. Finally, down-sample the interpolated signal by a factor of M = 3 and plot the resulting re-sampled signal, y[n].Explanation / Answer
n= input('enter the no.of samples ');
t=0:.0001:5;
y=cos(pi*n);
plot(t,y);
ylabel ('Amplitude');
xlabel ('Time Index');
TITLE ('cosine wave');
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.