Signal defined by:
%%Time specifications:
Fs = 8000; % samples per second
dt = 1/Fs; % seconds per sample
StopTime = 0.25; % seconds
t = (0:dt:StopTime-dt)'; % seconds %%Sine wave:
Fc = 60; % hertz
x = 3*sin(x) + sin(.5*x+40) + 2*sin(3*x-60); % Plot the signal versus time:
figure; plot(t,x); xlabel('time (in seconds)'); title('Signal versus Time'); zoom xon;
The signal image is attached.
I did this for the FFT of the signal:
Y = fft(x);% Plot single-sided amplitude spectrum.
plot(Y) title('Fast Fourier Transform of X graph)')xlabel('Frequency (Hz)')ylabel('Time (seconds)')
I figured since it was a simple function, I did not need elaborate coding but then I got the "FFT" attached.
Can someone tell me how to get the correct FFT please! Thanks.
Best Answer