Question regarding interpolation and decimation

1 回表示 (過去 30 日間)
Abdullah Wasi
Abdullah Wasi 2021 年 9 月 20 日
回答済み: Ananya Tewari 2021 年 9 月 23 日
Hi, I was tasked with the following question:
Construct a DT signal given by
  • Sketch the signal using the stem function.
  • Transform the signal x[k] based on the operation y[k] = x[k/5] followed by the operation z[k] = y[5k]. What is the relationship between x[k] and z[k]?
  • Repeat (ii) with the order of interpolation and decimation reversed.
So far I've solved (i) and (ii) (code and result attached). Is what I'm doing correct? I also need help understanding the (iii) as I simply do not get what is being asked. Please let me know if what I have solved is correct and that what is being asked in (iii).
clc;
close all;
clear all;
% Variables
k = [0:1:120];
x = (1 - exp(-0.003 * k) .* cos((pi * k) / 20));
N = length(x);
n = 0:N-1;
% Question I
subplot(3,1,1)
stem(n, x);
xlabel('Samples');
ylabel('Amplitude');
title('Input Sequence');
% Question II
y = x(1:5:120);
n1 = 0:length(y)-1;
subplot(3,1,2)
stem(n1, y);
xlabel('Samples');
ylabel('Amplitude');
title('Decimated Sequence');
z = zeros(1,5*N);
n2 = 1:1:5*N;
j = 1:5:5*N;
z(j) = x;
subplot(3,1,3)
stem(n2, z);
xlabel('Samples');
ylabel('Amplitude');
title('Interpolated Sequence');

回答 (1 件)

Ananya Tewari
Ananya Tewari 2021 年 9 月 23 日
Hi,
You can refer to the documentation of interpolation and decimation to understand about them. Here is the link to another answer which may help you in getting a better understanding of interpolation, decimation and their implementation.

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by