有一组数据 Y 其中有部分缺失, Y 的 估计价是 Y_hat

假如在Y(t)缺失,我想把Y(t)换做Y_hat(t)要怎么表达?

是不是 
if isnan(Y),

Y(t) = Y_hat(t);

我试了好象不对

能帮帮忙吗?谢谢了