MATLAB: Plotting multiple series on one graph from a text file

plot

i am trying to make a single graph from a text file which is looped with 15 different variables over time.
does anyone know how i can do this? below is an attachment of the text file im attempting to graph.
column one repeats itself 1-15 and i wish for each integer from 1-15 to have its own series on the graph

Best Answer

They all appear to plot together, and there is no easy way to offset them to plot them in a single plot. The best option then appears to be plotting them each in a subplot:
fidi = fopen('carpos.txt','rt');
Dc = textscan(fidi, '%f%f%f', 'CollectOutput',1);
D = cell2mat(Dc);
endData = find(D(:,1) == 14, 1, 'last');
D = D(1:endData,:);
Dr = reshape(D, 15, 3, []);
figure
for k1 = 1:size(Dr,1)
subplot(5,3,k1)
plot3(squeeze(Dr(k1,1,:)), squeeze(Dr(k1,2,:)), squeeze(Dr(k1,3,:)))
grid on
axis equal
title(sprintf('%d',k1-1))
end
Experiment to get the result you want.