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.

 采纳的回答

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.

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by