Error When Using fillmissing Function on Table
이전 댓글 표시
I have a table and I am trying to replace all the NaN values with 0. Based on the documentation for 'fillmissing' this should be straightforward but when I execute the commands:
d = [NaT; NaT; NaT; NaT; NaT];
x = [2; 4; 3; NaN; NaN];
t = table(d,x)
fillmissing(t,'constant',0)
It produces the following error:
Error using fillmissing/checkArrayType (line 517)
Invalid fill constant type.
Error in fillmissing/fillTableVar (line 155)
[intConstVj,extMethodVj] = checkArrayType(Avj,intMethod,intConstVj,extMethodVj,x,true);
Error in fillmissing/fillTable (line 133)
B.(vj) = fillTableVar(indVj,A.(vj),intMethod,intConst,extMethod,x,useJthFillConstant,useJthExtrapConstant);
Error in fillmissing (line 116)
B = fillTable(A,intM,intC,extM,x,dataVars);
Why do I get this error and how can I prevent this?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!