Effacer les filtres
Effacer les filtres

Plotting a Shaded region using the movie function

2 vues (au cours des 30 derniers jours)
WARRIOR24
WARRIOR24 le 4 Mai 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 ;

Réponses (1)

Image Analyst
Image Analyst le 4 Mai 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.

Catégories

En savoir plus sur Animation dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by