NaN when I type "known" variables (like pi, etc) in an editable uitable
Afficher commentaires plus anciens
Hi,
I have an uitable with 2 columns and its ColumnFormat are char and numeric; the numeric column is editable.
When I type pi or pi/2 it returns 'NaN' where I type.
Matlab Help suggests to use CellEditCallback command, but I don't understand how I shoud use it and how can it solves my problem.
Thanks
Réponse acceptée
Plus de réponses (1)
Azzi Abdelmalek
le 21 Jan 2013
0 votes
If you want to type pi/2, then make your column format char
4 commentaires
Marco
le 21 Jan 2013
Azzi Abdelmalek
le 21 Jan 2013
Modifié(e) : Azzi Abdelmalek
le 21 Jan 2013
Because the previous value was not a string
Azzi Abdelmalek
le 21 Jan 2013
If you want to use pi/2 as numeric , just use the function str2num
Marco
le 21 Jan 2013
Catégories
En savoir plus sur Data Type Conversion dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!