title: Find z-transform and plot it's pole-zero map with MATLAB
body: <p>I have this function:</p>
  
  <p>x[n] = (1/2) ^ n * u[n] + (-1/3) ^ n * u[n]</p>
  
  <p>I need to do two things with this using MATLAB:</p>
  
  <ol>
  <li><p>Find it's <em>z</em>-transform.</p></li>
  <li><p>Plot it's poles and zeros.</p></li>
  </ol>
  
  <p>I am using the following code:</p>
  
  <pre><code>syms n;
  f = (1/2)^n + (-1/3)^n;
  F = ztrans(f);
  </code></pre>
  
  <p>I get the <em>z</em>-transform in the <code>F</code> variable, but I can't see how to create it's pole-zero plot. I am using the built-in function <code>pzmap</code> (<code>pzmap(F);</code>), but it doesn't seem to work with the output of <code>ztrans(f)</code>.</p>
  
  <p>What am I doing wrong? Do I need to change the <em>z</em>-transform into some other form like like a transfer function model or a zero-pole gain model? If so, can someone explain how that can be done using the output of <code>ztrans(f)</code>?</p>