نام دستور:

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',[fusion_builder_container hundred_percent="yes" overflow="visible"][fusion_builder_row][fusion_builder_column type="1_1" background_position="left top" background_color="" border_size="" border_color="" border_style="solid" spacing="yes" background_image="" background_repeat="no-repeat" padding="" margin_top="0px" margin_bottom="0px" class="" id="" animation_type="" animation_speed="0.3" animation_direction="left" hide_on_mobile="no" center_content="no" min_height="none"][-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);

 [/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]