The graph shows time along the horizontal axis and frequency along the vertical axis. With a color of pixels showing the intensity of each frequency at any given time.
A spectrogram is generated by receiving a signal and chopping it into small time segments, making a Fourier series on each segment.
here is some kind of matlab code to generate.
Pay attention to how the signal is directly printed, it looks like garbage, but, having built a spectrogram, we can clearly see the frequencies of the component signals.
%%%%%%%% %% setup %%%%%%%% %signal length in seconds signalLength = 60+10*randn(); %100Hz sampling rate sampleRate = 100; dt = 1/sampleRate; %total number of samples, and all time tags Nsamples = round(sampleRate*signalLength); time = linspace(0,signalLength,Nsamples); %%%%%%%%%%%%%%%%%%%%% %create a test signal %%%%%%%%%%%%%%%%%%%%% %function for converting from time to frequency in this test signal F1 = @(T)0+40*T/signalLength;
The inverse Fourier transform of the matrix fourierResult will return the original signal.
mdaoust
source share