Replace all nan values in a UITable with 0

2 vues (au cours des 30 derniers jours)
Adham Elkhouly
Adham Elkhouly le 29 Nov 2022
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

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by