fft_spectrum
Versión 1.0.4 (78,4 KB) por
Gregory Pelletier
Function to plot the FFT power spectrum of continuous time-series data with time in days or datenum
This function makes spectral power density plots for continuous time-series data, for example oceanography data collected from moorings, hydrolab data from water quality studies or data sondes, or any continuous time series data set with equal time intervals in units of days and no missing data. If there are any missing data the missing values will be replaced with the mean of all the time-series data.
For example, to plot spectral density of time-series data for tide heights, dissolved oxygen, pH, temperature, salinity, etc.
The output from fft_spectrum is a figure and png file with two panels:
a. time series plot
b. plot of the FFT power spectrum of frequencies for the data
% load example data set of tide heights in Mar-Jun 2018 in Puget Sound
load fft_spectrum_example_data
% run the fft_spectrum function on the example data set
fft_spectrum(jdatenum, depth, 'Tide Height', 'm', 3);
Citar como
Gregory Pelletier (2024). fft_spectrum (https://www.mathworks.com/matlabcentral/fileexchange/109274-fft_spectrum), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2022a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.4 | moved the test for missing values before the test for odd number of input values in the time-series in case both problems with the input data need to be fixed |
||
1.0.3 | added code to replace any missing values in the time-series data with the mean of all of the data |
||
1.0.2 | corrected typo in yaxis units label for power spectrum plot |
||
1.0.1 | corrected typo in yaxis units label for power spectrum plot |
||
1.0.0 |