Effacer les filtres
Effacer les filtres

how to write number into uitable?

1 vue (au cours des 30 derniers jours)
best16 programmer
best16 programmer le 22 Mai 2017
Commenté : Jan le 22 Mai 2017
hello, i have a uitable in a gui application and i want to write a number such as:
x=x0±0.01
with x0 is a number,can you help me with that?
thank you

Réponse acceptée

Jan
Jan le 22 Mai 2017
Modifié(e) : Jan le 22 Mai 2017
"x=x0±0.01" is not a number. You can write this as a string only. Then you can parse the strings when the data are used.
  2 commentaires
best16 programmer
best16 programmer le 22 Mai 2017
thank you,but the x0 is a number. can you please show me an example
Jan
Jan le 22 Mai 2017
What about Star Strider's example? I still do not know, what you want to achieve.

Connectez-vous pour commenter.

Plus de réponses (1)

Star Strider
Star Strider le 22 Mai 2017
I would use sprintf to create ‘x’:
x = sprintf('%.2f±0.01', x0);
Change it if necessary to create the result you want.

Catégories

En savoir plus sur Numeric Types dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by