Filter löschen
Filter löschen

Plotting a Shaded region using the movie function

2 Ansichten (letzte 30 Tage)
WARRIOR24
WARRIOR24 am 4 Mai 2021
Beantwortet: Image Analyst am 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 ;

Antworten (1)

Image Analyst
Image Analyst am 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.

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by