How to play video using data from structure.

I am trying to play a video in MATLAB using the data in the struct matrix S. Please let me know how to proceed. Matrices 't_video' denotes the time and xg_sc, yg_sc should change with the time.

 Accepted Answer

Babu - are you trying to plot the rho_video data at each tilmestep? For example, could you do something like
figure;
for k=1:length(S.t_video)
image(squeeze(S.rho_video(k,:,:)));
pause(1);
end
We read each of the frames (?) from rho_video and draw it to the figure. We then wait one second before proceeding to the next frame. squeeze is used to remove the singleton dimension.

More Answers (0)

Asked:

on 26 Feb 2016

Commented:

on 28 Feb 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!