フィルターのクリア

Reconstruct a sequence from its DTFT

1 回表示 (過去 30 日間)
Jetty Rakesh Aditya
Jetty Rakesh Aditya 2020 年 11 月 1 日
回答済み: Shubham Khatri 2020 年 11 月 10 日
I have a sequence x and i have found its DTFT. Now i am trying to reconstruct the sequence x from its DTFT. Can someone help me with this? Thanks
  1 件のコメント
Matt J
Matt J 2020 年 11 月 1 日
Wy not just use the known formula for the IDTFT?

サインインしてコメントする。

回答 (1 件)

Shubham Khatri
Shubham Khatri 2020 年 11 月 10 日
Hi , please take a look at the following code for calculating the iDTFT. It first calculates the DTFT followed by IDTFT.
W = 2; %angular freq
Fs = 100; % frequency meant to replicate continuous data
t = 0:1/Fs:W-1/Fs; %time
N = length(t);
x = cos(2*pi*t);
% Sampled x
fs = 20; % sampling frequency
Ts = 1/fs;
num = W*fs; % # of (discrete) samples to get
n = 0:num-1;
xn = cos(2*pi*n*Ts);
% Discrete Time Fourier Transform
f2 = -10:1/Fs:10;
Xs = zeros(1,length(f2));
for i1 = 1:length(f2)
s = 0;
for i2 = 1:length(n)
s = s + xn(i2)*exp(-1i*f2(i1)*i2)
end
Xs(i1) = s
end
% Inverse Discrete Time Fourier Transform
n2 = 0:length(n)-1;
xsr = zeros(1,length(n2));
range = 0:1/Fs:2*pi-1/Fs;
for i1 = 1:length(n2)
s = 0;
for i2 = (1:length(range))+floor(length(f2)/2)
s = s + Xs(i2)*exp(1i*f2(i2)*i1);
end
xsr(i1) = s/2/pi/Fs; % divide by Fs to replciate infintesimaly small dt
end

カテゴリ

Help Center および File ExchangeTime Series についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by