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

1 次查看(过去 30 天)
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?

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by