نام دستور:

mplay

mplay('filename.avi')

mplay('filename.avi',FPS)

mplay(A)

mplay(A,FPS)

mplay({line_handles})

mplay({'block',PORT})

نحوه استفاده:

% Create a video

fig=figure; % create a video

set(gca,'xlim',[-80 80],'ylim',[-80 80],'NextPlot', ...
'replace','Visible','off');

x = -pi:.1:pi;

radius = 0:length(x);

video = []; % initialize video variable

for i=length(x):-1:1

patch(sin(x)*radius(i),cos(x)*radius(i), ...

[abs(cos(x(i))) 0 0]);

F = getframe(gca);

video = cat(4,video,F.cdata); % video is MxNx3xT

end

% Close the figure

close(fig);

% Display video player. Click play button on display
mplay(video);