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

回答(1 个)
Star Strider
2017-9-28
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!