fourier_spectrum(nsamples,
data,
deltat,
logdb,
power,
rms)
| source code
|
Given nsamples of real voltage data spaced deltat seconds apart, find the spectrum of the
data (its frequency components). If logdb, return in dBV, otherwise linear volts.
If power, return the power spectrum, otherwise the amplitude spectrum.
If rms, use RMS volts, otherwise use peak-peak volts.
Also return the number of frequency samples, the frequency sample spacing and maximum frequency.
Note: The results from this agree pretty much with my HP 3582A FFT Spectrum Analyzer,
although that has higher dynamic range than the 8 bit scope.
|