Fillmissing function with movmean
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have a set of data with NaNs. So I filled the NaNs useing the fillmissing function. However, while the final array does not have NaNs in it, any mathematical computation performed on it returns NaN. What could be the problem?
Thanks
0 Commenti
Risposte (1)
Steven Lord
il 14 Giu 2022
Operations involving NaN as one of the operands is one common way to get a NaN in the output, but it is not the only way. See Wikipedia for a list of other operations that can generate a NaN. If all your data is finite, likely you computed 0/0.
x = 0/0
There are more ways to generate a NaN if infinity gets involved (such as if your calculations overflow.)
[0*Inf, Inf-Inf, Inf/Inf, rem(Inf, 0)]
0 Commenti
Vedere anche
Categorie
Scopri di più su Data Type Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!