How do I save animated line graph in GIF figure format

3 次查看(过去 30 天)
I want to save the out put figure into GIF figure format kindly help
h = animatedline;
h1=animatedline('Color','r','Marker','o');
h2=animatedline('Color','g','Marker','o');
axis([0,2,-1,3])
x = linspace(0,2,100);
y = x.^2-1;
x1=0:0.001:1.0;
x2=2:-0.001:1.0;
x3=-1:0.001:0;
y1= x1.^2-1;
y2=x2.^2-1;
grid on
for k = 1:length(x)
addpoints(h,x(k),y(k));
drawnow
hold on
end
for k = 1:length(x1)
addpoints(h1,x1(k),y1(k));
drawnow
hold on
end
for k = 1:length(x2)
addpoints(h2,x2(k),y2(k));
drawnow
hold on
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by