Display a result + unit in GUI in ,,static text,, field
1 次查看(过去 30 天)
显示 更早的评论
I've wrote a porgram with a GUI and I can display a numerical result in a ,,static text,, field, but I want to be displayed an unit too. Is it possible with a ,set, command?
0 个评论
采纳的回答
Sriram
2012-8-7
yes... you can!
here is an easy way to do it
%%Just Concatenate :) 100 is the value to display along with the unit
your_display = [num2str(100) 'unit'];
set (handles.text,'string',your_display)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!