23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

fig=figure;<br />

set(fig,'DoubleBuffer','on');<br />

set(gca,'xlim',[-80 80],'ylim',[-80 80],...<br />

'nextplot','replace','Visible','off')<br />

aviobj = avifile('example.avi')<br />

x = -pi:.1:pi;<br />

radius = 0:length(x);<br />

for i=1:length(x)<br />

h = patch(sin(x)*radius(i),cos(x)*radius(i),...<br />

[abs(cos(x(i))) 0 0]);<br />

set(h,'EraseMode','xor');<br />

frame = getframe(gca);<br />

aviobj = addframe(aviobj,frame);<br />

end<br />

aviobj = close(aviobj);<br />

See Also avifile, close, movie2avi<br />

addframe<br />

2-39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!