Help with Fourier Transform

Hello, i need to run the fourier transform and then find the spectrum of the function X which i put in the figure. I know the correct result that has to come and that is the one in the excel figure. can help me somebody? Thanks so much.
dt = 0.00001 %Sampling Frequency 10 microsecond, 0.00001 second
L = 0.0004; %Signal length in second
t = (0:dt:0.0004); % Time vector
t0= 0.0001; %Peak Time, 100 microsecond, 0.0001 second
P0 = 100; %Peak Pressure in t0 100 Mpa
r = 1.5; %Ratio alpha/beta
a = log(r)/((r-1)*t0);
b = 1.5*a;
csi=1/((exp(-a*t0)-(exp(-b*t0))));
X = P0*csi*(exp(-a*t)-exp(-b*t)); %Plotted Function
plot(t,X);
title('Time Domain');
xlabel('Time (second)');
ylabel('Pressure (MPa)');
FFT????????????????????????????????????????????
end

Answers (1)

Star Strider
Star Strider on 28 Sep 2017
I am not certain what you want. To understand how to calculate the Fourier transform in MATLAB, see the documentation on the fft (link) function. Specifically note the code between the first (top) two plot figures.

Categories

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

Asked:

on 28 Sep 2017

Answered:

on 28 Sep 2017

Community Treasure Hunt

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

Start Hunting!