function aviobj = LagenMovie(X,UFRAMES,TFRAMES)
  [dummy,nframes] = size(TFRAMES) ;
  aviobj = avifile('example.avi')
  rect   = [100 100 612 612] ;
  fig    = figure('position',rect) ;
  set(fig,'DoubleBuffer','on');
  axis manual ;
  title('Lagen Movie');
  for i=1:nframes
    clc;
    plot(X, UFRAMES(i,:),'-ob','MarkerFaceColor','r');
    axis([-1 1 -0.5 1.5]);
    aviobj = addframe(aviobj,getframe(fig));
  end
  aviobj = close(aviobj);
end
