Computing the Discrete Fourier Transform at 1/10 the Fourier Frequency
3 views (last 30 days)
Show older comments
I was asked to evaluate the fourier transform of time series g(n)=(a*cos(2*pi*f*t(n))) and then evaluate at 1/10 the fourier frequency
I computed the normal fourier transform. Simple! But now I am asked to computing the Discrete Fourier Transform at 1/10 the Fourier Frequency without any changes to the sample interval or time series. Does anyone have any ideas!
This code is the normal fourier transform
% discrete fourier transform plots
clear all; close all;
t=(-80:80);
N=161; %total observations
delt=1; %sample interval
a1=3; %arbitrary magnitude
%1.1
figure(1)
f1=4/N;
g=zeros(1,N);
for n = 1:(N)
g(n)=(a1*cos(2*pi*f1*t(n)));
end
G=zeros(1,N);
f=zeros(1,N);
for j = 1:(N)
f(j)=(j-81)/(N*delt);
for n = 1:N
sum=(1/N)*g(n)*exp(-1i*2*pi*(j-81)*((n-81)/N));
G(j)=G(j)+sum;
end
end
plot(f,real(G))
hold on
How do I fourier transform at 1/0 the fourier frequency as seen above?
I am stuck on wrapping my head around how to index this in matlab since the fourier transform will have ten times as many indexes than the time series
I was wondering if I have to round the time series to its nearest value when computing the transform with more indexes for frequency. This is my failed attempt seen below
G=zeros(1,N*10);
f=zeros(1,N*10);
q=zeros(1,N*10);
for j = 1:(N*10)
f(j)=(j*.1-81)/(N*delt);
q(j)=round(j*.1);
if round(j*.1) == 0
q(j)=1;
end
end
for j = 1:(N*10)
sum=(1/N)*g(q(j))*exp(-1i*2*pi*(j*.1-81)*((j*.1-81)/N));
G(j)=G(j)+sum;
end
plot(f,real(G))
blue is correct orange is my failed attempt
Any help would be greatly appreciated!
2 Comments
David Goodmanson
on 25 Feb 2021
Hi MK,
If you are sampling at a certain sampling frequency, there is a cetain time step between samples. If you sample at half that frequency, sampling goes slower and there is now twice as much time between sample steps as there was before, correct? So can take every other sample of the set you were doing before. And so forth ...
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!