freq_HZ = 2000; % Define the frequency in Hertz
freq_RPS = 2*pi*freq_HZ; % Compute the frequency in rad/sec
t = 0:1/8000:5; % Define the time vector
y = sin(freq_RPS * t);f = (0:length(y)-1)*8000/length(y);plot(f,abs(fft(y)))
MATLAB: Is this code saying i have a wave at 2 KHz and 6Khz?
fft
Related Question
- How to transform data in Time-Domain from excel to Frequency-Domain by using FFT in order to get PSD
- I want frequency domain spectrum of an audio file but i am not getting right frequency range. it is showing freq. range upto 100 kHz but i want to get it upto 10 kHz. what is the problem in frequency range
- I get the peaks at the wrong frequency and with the wrong amplitude.
- Is the 1kHz allpass filter returning 1.125kHz
Best Answer