I am trying to create an animation of 40 particles moving. I want to create a for loop that goings through 40 lines of my data every iteration so I can plot 40 particles per frame in the movie. I want to plot 40 particles per iteration.
link to the data data.20.csv
table = readtable('data20.csv');data = table2cell(table);y = [data{:,5}];x = [data{:,4}];z = [data{:,6}];time = [data{:,2}];% axes([x(1) x(1,end) y(1) y(1,end) z(1) z(1,end)])
for i = 1:length(time) for k = 1:20; X = data{k,4}; Y = data{k,5}; Z = data{k,6}; [X,Y,Z] = particle_ID; end plot3(X,Y,Z) iteration = particle_IDend
Best Answer