Question

In: Physics

Find the Fast Fourier Transform (FFT) of some functions by MATLAB and interpret them. Change the...

Find the Fast Fourier Transform (FFT) of some functions by MATLAB and interpret them. Change the sampling frequency to observe the aliasing.

Solutions

Expert Solution

Syntax

Y = fft(X), Computes the discrete Fourier transform (DFT) of X using a fast Fourier transform (FFT) algorithm

Y = fft(X,n), Returns the n-point DFT. If no value is specified, Y is the same size as X

Y = fft(X,n,dim), Returns the Fourier transform along the dimension dim. For example, if X is a matrix, then fft(X,n,2) returns the n-point Fourier transform of each row.

Examples-

Convert a Gaussian pulse from the time domain to the frequency domain.

Define signal parameters and a Gaussian pulse, X.

Fs = 100;           % Sampling frequency
t = -0.5:1/Fs:0.5;  % Time vector 
L = length(t);      % Signal length

X = 1/(4*sqrt(2*pi*0.01))*(exp(-t.^2/(2*0.01)));

Plot the pulse in the time domain

plot(t,X)
title('Gaussian Pulse in Time Domain')
xlabel('Time (t)')
ylabel('X(t)')

To use the fft function to convert the signal to the frequency domain, first identify a new input length that is the next power of 2 from the original signal length. This will pad the signal X with trailing zeros in order to improve the performance of fft.

n = 2^nextpow2(L);

Convert the Gaussian pulse to the frequency domain.

Y = fft(X,n);

Define the frequency domain and plot the unique frequencies.

f = Fs*(0:(n/2))/n;
P = abs(Y/n);

plot(f,P(1:n/2+1)) 
title('Gaussian Pulse in Frequency Domain')
xlabel('Frequency (f)')
ylabel('|P(f)|')


Related Solutions

Hello, I need the Matlab code of the Fourier Transform without using the Matlab functions fft...
Hello, I need the Matlab code of the Fourier Transform without using the Matlab functions fft and dft. Applied to discrete signals. If you can with an example.Thank you!!
(TCO 7) What is the difference between discrete Fourier transform (DFT) and fast Fourier transform (FFT)?...
(TCO 7) What is the difference between discrete Fourier transform (DFT) and fast Fourier transform (FFT)? can you please type it cant see images.
Using Matlab Simulink, find Fourier transform of the following signal; ?(?) = 2 + ∑ 1...
Using Matlab Simulink, find Fourier transform of the following signal; ?(?) = 2 + ∑ 1 ? sin (20???) 4 ?=1 . Set simulation stop time = 20 seconds, sample time = (1/1024) seconds, buffer size =1024, and frequency range in Hz for the vector scope is −100 ≤ ? ≤ 100
What is the effect of the filter on the Fast Fourier Transform of voice signal? Is...
What is the effect of the filter on the Fast Fourier Transform of voice signal? Is quantization visible? How can you tell?
a) Find the Fourier Cosine Transform of ?(?) = sin ? ; 0 < ? <...
a) Find the Fourier Cosine Transform of ?(?) = sin ? ; 0 < ? < ?. b) Solve, by using Laplace Transform: ?" + ? = 3 ??? 2?; ?(0) = 0, ?′(0) = 0.
Given the following functions, can you have the corresponding a) Fourier series, b) Fourier transform and...
Given the following functions, can you have the corresponding a) Fourier series, b) Fourier transform and c) Laplace transform? If yes, find them, if not, explain why you can not. A, x(t) = -1+cos(2t) + sin(pai*t+1)                                               (4-1) B, x(t) = 2d(t) cos(2t) +d(t-1.5p) sin(2t)                                          (4-2) C, x(t) = 1+cos(1.5t) + cos(4t)                                           (4-3)
Given the following functions, can you have the corresponding a) Fourier series, b) Fourier transform and...
Given the following functions, can you have the corresponding a) Fourier series, b) Fourier transform and c) Laplace transform? If yes, find them, if not, explain why you can not. A, x(t) = -1+cos(2t) + sin(pt+1)                                                                                 (4-1) B, x(t) =2d(t) cos(2t) +d(t-1.5p) sin(2t)                                                                    (4-2) C, x(t) = 1+cos(1.5t) + cos(4t)                                                                                    (4-3)
What increase in speed can be expected in using a fast Fourier transform algorithm rather than...
What increase in speed can be expected in using a fast Fourier transform algorithm rather than direct arithmetic to compute the Fourier transform of an image of size 1024 × 1024?
Write a Matlab program to create specialized plot animation with 16 frames by using fast Fourier...
Write a Matlab program to create specialized plot animation with 16 frames by using fast Fourier transforms of complex matrices
Use the Fourier transform to find the solution of the following initial boundaryvalue Laplace equations uxx...
Use the Fourier transform to find the solution of the following initial boundaryvalue Laplace equations uxx + uyy = 0, −∞ < x < ∞ 0 < y < a, u(x, 0) = f(x), u(x, a) = 0, −∞ < x < ∞ u(x, y) → 0 uniformlyiny as|x| → ∞.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT