Animating a 2-D Array as a function of time
Hi,
I’m trying to construct an animation for a 1200×8 array named ‘ppdtrace’ that returns the entire row data in a stepwise manner. I’m hoping to track the evolution of these data at points 1:8 across 1200 time steps. So, it would read in the data from row 1 and plot the return values along the y-plane with whole numbers [1:8] on the x-plane. What I have currently uses the animatedline function and plots it with:
h=animatedline(‘MaximumNumPoints’,100);
for i=1:1200
for l=1:8
addpoints(h,l,ppdtrace(i,l));
drawnow;
end
end
Which evolves as I was predicting, but I would prefer to have only data points denoted as ‘o’ , ‘x’ , or something of this manner, without the lines between. Is there a function that I can use to achieve this, or perhaps a command I can use to manipulate the animatedline function?
Alternatively, I would be fine with continuing to use animatedline if there was a way to prevent the function from connecting the data point at position 8 in the (n)th row with the data point at position 1 in the n+1 row.
Thanks!Hi,
I’m trying to construct an animation for a 1200×8 array named ‘ppdtrace’ that returns the entire row data in a stepwise manner. I’m hoping to track the evolution of these data at points 1:8 across 1200 time steps. So, it would read in the data from row 1 and plot the return values along the y-plane with whole numbers [1:8] on the x-plane. What I have currently uses the animatedline function and plots it with:
h=animatedline(‘MaximumNumPoints’,100);
for i=1:1200
for l=1:8
addpoints(h,l,ppdtrace(i,l));
drawnow;
end
end
Which evolves as I was predicting, but I would prefer to have only data points denoted as ‘o’ , ‘x’ , or something of this manner, without the lines between. Is there a function that I can use to achieve this, or perhaps a command I can use to manipulate the animatedline function?
Alternatively, I would be fine with continuing to use animatedline if there was a way to prevent the function from connecting the data point at position 8 in the (n)th row with the data point at position 1 in the n+1 row.
Thanks! Hi,
I’m trying to construct an animation for a 1200×8 array named ‘ppdtrace’ that returns the entire row data in a stepwise manner. I’m hoping to track the evolution of these data at points 1:8 across 1200 time steps. So, it would read in the data from row 1 and plot the return values along the y-plane with whole numbers [1:8] on the x-plane. What I have currently uses the animatedline function and plots it with:
h=animatedline(‘MaximumNumPoints’,100);
for i=1:1200
for l=1:8
addpoints(h,l,ppdtrace(i,l));
drawnow;
end
end
Which evolves as I was predicting, but I would prefer to have only data points denoted as ‘o’ , ‘x’ , or something of this manner, without the lines between. Is there a function that I can use to achieve this, or perhaps a command I can use to manipulate the animatedline function?
Alternatively, I would be fine with continuing to use animatedline if there was a way to prevent the function from connecting the data point at position 8 in the (n)th row with the data point at position 1 in the n+1 row.
Thanks! animation, animatedline MATLAB Answers — New Questions