title: Use a slider in MATLAB GUI
body: <p>Really simple question. I wish to create <code>GUI</code> with a simple <code>plot</code> that changes something with a slider. I have been using the GUI and have a slider+text on a panel and axies1. So for starters I just wish to have the slider going from 1:10 (no specific increments) and scaling the y-values (by 1:10). I have imported my data into the GUI, so leaving out the generic auto-generate code I have:</p>
  
  <p>Under Graphslide_OpeningFcn</p>
  
  <pre><code>handles.OutAirTemp = OutAirTemp;
  handles.SupAirTemp = SupAirTemp;
  guidata(hObject,handles);
  handles.a = get(handles.slider2,'Value');
  plot(handles.SupAirTemp,handles.a*handles.OutAirTemp)
  </code></pre>
  
  <p>Under slider2_Callback</p>
  
  <pre><code>a = get(hObject,'Value')
  </code></pre>
  
  <p>So clearly I am missing something! Any pointers, theory or code will be greatly received.</p>
  
  <p><code>Edit1</code>
  There was no error message for the above. It however didn't change the graph when sliding the slider.</p>