This document discusses generating a signal sample at 1000Hz and taking its fast Fourier transform (FFT) to analyze the frequency components. It creates a signal s over time t, takes the FFT of s, and plots the time domain signal and the magnitude of the frequency response, showing that most of the energy is concentrated at lower frequencies below 20Hz.
This document discusses generating a signal sample at 1000Hz and taking its fast Fourier transform (FFT) to analyze the frequency components. It creates a signal s over time t, takes the FFT of s, and plots the time domain signal and the magnitude of the frequency response, showing that most of the energy is concentrated at lower frequencies below 20Hz.
This document discusses generating a signal sample at 1000Hz and taking its fast Fourier transform (FFT) to analyze the frequency components. It creates a signal s over time t, takes the FFT of s, and plots the time domain signal and the magnitude of the frequency response, showing that most of the energy is concentrated at lower frequencies below 20Hz.
1000Hz clc clf sample_rate=1000 t=-3: 1/sample_rate:3 N=size(t,'*');//number of samples s=exp(-t^2) y=fft(s)//s is real so fft response is conjugate symmetric and we retain only the first N f=sample_rate*(0:(N/2))/N; n=size(f,'*') subplot(2,1,1) plot2d(t,s) subplot(2,1,2) a=gca(); plot2d(f,abs(y(1:n))) a.data_bounds=[0,0;20,200]