Animation flickering problem

조회 수: 7 (최근 30일)
vasil enchev
vasil enchev 2011년 6월 24일
Hello, I animate a car mooving by a curve and I want to create animation with out flickering. The whole animation is 8/9 seconds and the plotting takes over 2 minutes... I have this code:
fig=figure;
set(fig,'DoubleBuffer','on');
aviobj = avifile('mov.avi','compression', 'none')
while step<length(x)
% some code for ploting the animation moovement here %
frame = getframe(gca);
aviobj = addframe(aviobj,frame);
end
aviobj = close(aviobj);
So I think it should have worked... but it doesn't. I have some plotting before this code in the same figgure. So could this be the problem... I dont think so but had to ask.
thank you!
  댓글 수: 2
Jan
Jan 2011년 6월 24일
Does the AVI contain flickering? What exactly does "it doesn't work" mean?
Sean de Wolski
Sean de Wolski 2011년 6월 24일
What is:
"some code for plotting animation"
It seems to me that's likely the source of the flicker. Do you use findobj?

댓글을 달려면 로그인하십시오.

답변 (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