フィルターのクリア

The numbers on the listbox do not look the way I want.

3 ビュー (過去 30 日間)
Muhendisleksi
Muhendisleksi 2017 年 8 月 18 日
コメント済み: Muhendisleksi 2017 年 8 月 18 日
my kod:
set(handles.listbox1,'String',x,'FontSize',12);
x = 3.71044e+06
How can I show it as "x =37104445.345"?
  3 件のコメント
Muhendisleksi
Muhendisleksi 2017 年 8 月 18 日
I get "x = K2 + dx/10000;" with this function and it prints the result.
Adam
Adam 2017 年 8 月 18 日
That still doesn't add anything to the question really. You set a string in the list box. Where is that string defined? Your x there is numeric so you must turn it into a string and how you do that will determine what is shown in the listbox.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2017 年 8 月 18 日
Try this:
x = 3.71044e+06;
s = sprintf('%.3f', x); % Turn x into a string.
handles.listbox1.String = s; % Send string to the listbox control.
Set the fontsize in GUIDE rather than code if you want it to be the same all the time.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by