Plotting a Shaded region using the movie function

1 visualización (últimos 30 días)
WARRIOR24
WARRIOR24 el 4 de Mayo de 2021
Respondida: Image Analyst el 4 de Mayo de 2021
I am using the Movie function to save a gif, everything I tried disappears when I open the gif.
I am trying to create a region where is x-axis < 1/2(x) - 5 and less then 1/2(x) + 5. basically between 1/2(x) - 5 < x < 1/2(x) + 5 and up and down y axis.
% Plot
pause(.1);
plot(Ey, 'r-', 'LineWidth',2);
hold on
plot(Hx, 'g-', 'LineWidth',2);
legend('E_y Field', 'H_x Field');
axis([0 z -2 2])
hold off
M(:,t) = getframe ;

Respuestas (1)

Image Analyst
Image Analyst el 4 de Mayo de 2021
Use xlim() to set the field of view along the x direction, then save the movie or gif as you're doing now.
Attached are a variety of movie demos. See the one called movie_made_from_surf.m, which is kind of like yours.

Categorías

Más información sobre Animation en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by