필터 지우기
필터 지우기

How to retrieve data entered in an edit box

조회 수: 4 (최근 30일)
Achchuthan Ganeshanathan
Achchuthan Ganeshanathan 2013년 3월 11일
I have an edit box in my GUI. User inputs a number into the editbox and then pushes a pushbutton. when the pushbutton is pressed an external function is called. for the external function i need the number entered in the editbox. How can i used 'handles' to retrieve the data input in the edit box?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 11일
편집: Azzi Abdelmalek 2013년 3월 11일
s=str2double(get(handles.editboxname,'string'))
% editboxname is the tag of your edit box.
  댓글 수: 9
Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 11일
편집: Image Analyst 2013년 3월 11일
The code
user_speed=str2double(get(handles.EnterSpeed,'string'));
You should put it in the pushbutton callback, NOT the edit field callback.
Achchuthan Ganeshanathan
Achchuthan Ganeshanathan 2013년 3월 11일
thankyou that has done the trick

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by