How to get rid of NaN when entered value other than numeric value in UI table in appdesigner?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to pass/edit the array(eg [1,2,3]) in the table cell. but when i press enter it show Nan. So what changes i have to make inorder to to the value as it is entered?
I even gave newRow = repmat({''},1,numCols) but than when i try to add value , it shows error msg. index aeceeds array . Please help me.
0 Commenti
Risposte (1)
BhaTTa
il 18 Lug 2025
When you enter something that doesn't match, it often defaults to NaN for numeric columns,the simplest way to fix it is it set ColumnFormat to 'char' or 'string' for the column where you want to type [1,2,3]. MATLAB will then treat it as text, not try to convert it to a single number, and thus won't produce NaN. You'll then process the text yourself in your code.
Hope it helps.
0 Commenti
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!