animate plot / trajectory in matlab / octave
问题 I'm trying to animate this spiral using matlab / octave I want it to spiral up or down 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); I tried using a for loop to animate it but that just gives me a cone shape see code and image below 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