Set numbers behind the comma in text edit view on gui matlab?

3 visualizzazioni (ultimi 30 giorni)
Im trying to display some output value from my calculations to an edit text box in my GUI window. I want to set 4 numbers behind the comma in text edit view. How I can do that?

Risposte (1)

Jan
Jan il 11 Mag 2017
set(handles.edit1, 'String', sprintf('%.4f', pi))

Categorie

Scopri di più su Environment and Settings 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!

Translated by