title: animate plot / trajectory in matlab / octave
body: <p>I'm trying to animate this spiral using matlab / octave I want it to spiral up or down</p>
  
  <pre><code>t = 0:0.1:10*pi;
  r = linspace (0, 1, numel (t));
  z = linspace (0, 1, numel (t));
  plot3 (r.*sin(t), r.*cos(t), z);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/9xu4L.png" alt="spiral"></p>
  
  <p>I tried using a for loop to animate it but that just gives me a cone shape see code and image below</p>
  
  <pre><code>clear all, clc,clf,tic
  t = 0:0.1:10*pi;
  r = linspace (0, 1, numel (t));
  z = linspace (0, 1, numel (t));
  
  for ii=1:length(r)
      ii
      plot3 (r.*sin(t(ii)), r.*cos(t(ii)), z);
      hold on
      %pause (.00001)
  end
  </code></pre>
  
  <p>Image <img src="https://i.stack.imgur.com/edcMR.png" alt="enter image description here"></p>