title: Calculate value of symbolic equation in MATLAB
body: <p>I have following MATLAB code:</p>
  
  <pre><code>&gt;&gt; syms x
  &gt;&gt; z = 20.*exp(x)+cos(x)
  &gt;&gt; derivative = diff(z)
  </code></pre>
  
  <p>How can I calculate value of derevative for any number, e.g. 6?</p>
  
  <p>Following commands</p>
  
  <pre><code>&gt;&gt; clear all
  &gt;&gt; x = 6
  &gt;&gt; derevative = 20*exp(x)-sin(x)
  </code></pre>
  
  <p>works fine, but if x is symbolic I don't use x = 6 such as above example.</p>