- Discard NaN's
- Fill the NaN's using interpolation (interp1, spline)
- Fill the NaN's using fillmissing
- Fill the NaN's using fillgaps
How can I compute spectrogram for data vector containing NaN values?
19 views (last 30 days)
Show older comments
Suzanne CARON--SAUTEJEAU
on 14 Jun 2019
Commented: Suzanne CARON--SAUTEJEAU
on 17 Jun 2019
Dear community,
I am currently working on seismic recordings and I need to compute the spectrogram. The dataset has been cleaned in advance, and thus the original vector contains small portions of NaN values (about a few seconds each with a sample rate of 100 Hz).
However, spectrogram function cannot be applied to NaN values without compromising the entire result, and applying it to not NaN values (applied to data(~isnan(data)) would provide incorrect results (spectrogram function assumes that the sample rate is homogeneous which would no longer be the case).
I do not really know how to manage this issue, and to compute a correct power spectral density for my data, if anyone has a clue...
Thank you
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Seismology in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!