Why does STD return NaN for financial time series with missing values (NaNs)?
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!