Plotting a Shaded region using the movie function

조회 수: 1 (최근 30일)
WARRIOR24
WARRIOR24 2021년 5월 4일
답변: Image Analyst 2021년 5월 4일
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 ;

답변 (1개)

Image Analyst
Image Analyst 2021년 5월 4일
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.

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by