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.

avifile<br />

2-80<br />

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

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

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

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

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

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

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

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

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

F = getframe(gca);<br />

mov = addframe(mov,F);<br />

end<br />

mov = close(mov);<br />

See Also addframe, close, movie2avi

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

Saved successfully!

Ooh no, something went wrong!