t = linspace(0,2.5*pi,40);
fact = 10*sin(t);fig=figure;aviobj = avifile('example.avi')
[x,y,z] = peaks;
for k=1:length(fact)
h = surf(x,y,fact(k)*z);
axis([-3 3 -3 3 -80 80])
axis off
caxis([-90 90])
F = getframe(fig);
aviobj = addframe(aviobj,F);
endclose(fig)aviobj = close(aviobj);
The code above was copied from HERE .
hi.can you help me about this error when using avifile function?
ReplyDeleteaviobj.FileHandle = avi('open',fout);
plz send your answer to hananeh_salehifar@YAHOO.COM
THANKS