Plot a video near a matlab plot

1 visualizzazione (ultimi 30 giorni)
Michela Longhi
Michela Longhi il 3 Lug 2017
Risposto: Shashank il 11 Lug 2017
Hi, I have a video and a plot which shows the measures of temperature at each seconds of the video. The matlab plot is a moving point, so both the video and the plot are moving. I have Three question:
  • How can I save the moving plot as a video (preferably with a transparent background)?
  • Is it possible to position the video near the plot, in the same window? How can I do?
  • Is it possible to overlap the moving plot over the video?
- Thanks a lot
Michela

Risposte (1)

Shashank
Shashank il 11 Lug 2017
Hi Michela,
  • You can save the moving plot as a video using the 'getframe' function. In the following example I store each frame in an array of structures:
n = 50;
XY = 10 * rand(2,n) - 5;
for i=1:n
plot(XY(1,i),XY(2,i),'or','MarkerSize',5,'MarkerFaceColor','r')
axis([-5 5 -5 5])
a(i)=getframe(gcf);
pause(.1)
end
-Shashank

Categorie

Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by