Replace all nan values in a UITable with 0

1 次查看(过去 30 天)
I am trying to replace all nan values in a uitable in MATLAB App designer with zeros. I tried using
app.UITable(isnan(app.UITable)) = 0;
but it doesn't change the nan values to zero

采纳的回答

Adham Elkhouly
Adham Elkhouly 2022-11-29
I used
app.UITable.Data = fillmissing(app.UITable.Data, 'constant', 0);
and all nan values were replaced by zero

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by