problem to transform a signal with fft

1 view (last 30 days)
i have the signal
h(t)=sinc((10^3)*t)
and i want to transform it to fourier with fft. Can you tell me the right way because it confuses me?

Accepted Answer

Walter Roberson
Walter Roberson on 16 Jan 2016
start_time = 0;
end_time = 20; %for example
t = linspace(start_time, end_time, 501); %create time vector
h = sinc(10^3*t);
hf = fft(h);
Now hf is the transformed value. It will have complex coefficients.
  2 Comments
chris m
chris m on 17 Jan 2016
Edited: chris m on 17 Jan 2016
so if i have time from -0.01 to 0.01 with step 0.0001 and h(t) then to compute fourier of h is:
t = -0.01:0.0001:0.01;
h = sinc((10^3)*t);
H = fft(h);
plot(H)
is this right? should not you get samples >2*fmax
Walter Roberson
Walter Roberson on 17 Jan 2016
H is going to be complex; if you plot it that way you will get a complex plot. You should probably plot(abs(H))

Sign in to comment.

More Answers (0)

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!