title: How to retrieve data from an editbox in a GUI
body: <p>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?</p>
  
  <p>This is the code for my opening function </p>
  
  <pre><code>% --- Executes just before NEWSTALLGUI is made visible.
  function NEWSTALLGUI_OpeningFcn(hObject, eventdata, handles, varargin)
  % This function has no output args, see OutputFcn.
  % hObject    handle to figure
  % eventdata  reserved - to be defined in a future version of MATLAB
  % handles    structure with handles and user data (see GUIDATA)
  % varargin   command line arguments to NEWSTALLGUI (see VARARGIN)
  
  % Choose default command line output for NEWSTALLGUI
  handles.output = hObject;
  
  % Update handles structure
  guidata(hObject, handles);
  set(handles.EnterSpeed,'string','0');
  
  % UIWAIT makes NEWSTALLGUI wait for user response (see UIRESUME)
  % uiwait(handles.figure1);
  </code></pre>
  
  <p>This is the code for my editbox </p>
  
  <pre><code>function EnterSpeed_Callback(hObject, eventdata, handles)
  % hObject    handle to EnterSpeed (see GCBO)
  % eventdata  reserved - to be defined in a future version of MATLAB
  % handles    structure with handles and user data (see GUIDATA)
  
  % Hints: get(hObject,'String') returns contents of EnterSpeed as text
  %        str2double(get(hObject,'String')) returns contents of EnterSpeed as a double
  user_speed=str2double(get(handles.EnterSpeed,'string'));
  </code></pre>
  
  <p>this is the code for my pushbutton</p>
  
  <pre><code>% --- Executes on button press in Calculate.
  function Calculate_Callback(hObject, eventdata, handles)
  % hObject    handle to Calculate (see GCBO)
  % eventdata  reserved - to be defined in a future version of MATLAB
  % handles    structure with handles and user data (see GUIDATA)
  Newfunction(user_speed);
  </code></pre>