Why does STD return NaN for financial time series with missing values (NaNs)?
Mostrar comentarios más antiguos
STD returns NaN when operating on financial time series containing NaN values. This happens when I execute the code below:
dates = {'jan-01-2001'; 'jan-02-2001'; 'jan-03-2001'; ...
'jan-04-2001'; 'jan-06-2001'};
data = [1; NaN; 1; NaN; 1];
t1 = fints(dates, data);
std(t1)
This behavior is also observed when I use MEAN on the same object.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!