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.

 Réponse acceptée

Geoff Hayes
Geoff Hayes le 28 Fév 2016
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.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by