title: How do you display something from a function onto a display window in a GUI in MATLAB?
body: <p>I have a function <code>sumsurface</code> that I use in the following code to display certain values in the command window:</p>
  
  <pre><code>if sumsurface(i) &lt; .01 &amp;&amp; sumsurface(i) &gt; -.01
  
      disp(sumsurface(i)); 
  
      disp(pH(i));
  
  end
  </code></pre>
  
  <p>However, I instead want to display <code>sumsurface(i)</code> and <code>pH(i)</code> on a display window in a GUI. How can I do this?</p>