title: Discretizing functions in Matlab
body: <p>I have the following function and set of values:</p>
  
  <pre><code>z(t):   {R → [-2,3] | z(t) = sin(0.5×π×t) + cos(2×π×t) + 1
  
  t = [-1 : 0.001 : 1]
  </code></pre>
  
  <p>I need to determine <code>z(n×Ts) = z(n)</code>, using the sample period <code>Ts=0.01</code>, therefore discretizing the fucnction.</p>
  
  <p>I tried using d2d, but for what I've understood can only be applied to zpk functions.</p>
  
  <p>Is there any other way to do it? </p>