フィルターのクリア

how to set value in edit text box.

24 ビュー (過去 30 日間)
shahid
shahid 2012 年 8 月 30 日
回答済み: Camilo Cárdenas 2022 年 3 月 16 日
i am having a problem i want to disply a number 'e.g 1000' in edit text box without using any pushbutton or anything....
i am writing this code in the call back function of edit_text but it doesn't give me the result.tag is edit1.
a=1000;
set(handles.edit1,'string',a);
please tell me how i can do that........waitng for your response reply sooon
Shahid Imran
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 9 月 2 日
Please read the guide to tags and retag this question; see http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags

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

回答 (3 件)

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 8 月 30 日
編集済み: Azzi Abdelmalek 2012 年 8 月 30 日
a=1000; set(handles.edit1,'string',num2str(a));
% a is double, you need to convert it to string
  1 件のコメント
VALARMATHY K
VALARMATHY K 2017 年 10 月 16 日
can you please help me to do this
a=get(handles.edit2, 'string');
z=str2num(a); b= z+10000;
c = b;
d='Your Balance is: %g', c;
set(handles.edit1,'string',d);
msgbox( sprintf('Your Balance is %g', c) );
in my message box i am getting correct output but i want to do this in edit text box

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


zakaria
zakaria 2014 年 6 月 3 日
post from 2012, the s of 'string' have to be Uppercase
a=1000; set(handles.edit1,'String',a);

Camilo Cárdenas
Camilo Cárdenas 2022 年 3 月 16 日
Hi,
Somebody knows how to do it "set value in EditField" using Appdesigner?
Thankyou!

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by