clear all
close all
clc

vid = VideoWriter('my_video.avi');
open(vid);

x= linspace(0,2*pi,1000);
for i=1:100
    plot(x,sin(i.*x))
    writeVideo(vid, getframe(gcf));
end

close(vid);
