Fourier Transform of a random Signal
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kutlu Yigitturk
am 1 Jun. 2021
Beantwortet: Sulaymon Eshkabilov
am 1 Jun. 2021
t = 0 : 0.001 : 2;
x = (2*(exp(-4*t))).*(cos(10*t).*unit(t))
subplot(2,1,1)
plot(t,x)
grid
I wrote such a code for this signal, but I don't know how to get the fourier transform of this signal. Thank you very much in advance for your help.
0 Kommentare
Akzeptierte Antwort
Sulaymon Eshkabilov
am 1 Jun. 2021
Hi,
Here is the complete code:
t = 0 : 0.001 : 2;
x = (2*(exp(-4*t))).*(cos(10*t).*heaviside(t));
L= numel(x);
Y = fft(x);
M2 = abs(Y/L);
M1 = M2(1:L/2+1);
M1(2:end-1) = 2*M1(2:end-1);
dt=.001;
Fs = 1/dt;
f = Fs*(0:(L/2))/L;
subplot(2,1,1)
plot(t,x)
grid on
subplot(212)
plot(f, abs(M1))
xlim([0, 50]), grid on
xlabel('f, [Hz]')
ylabel('|X|')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!