필터 지우기
필터 지우기

How can I animate a parabolic function?

조회 수: 3 (최근 30일)
Ezz El-din Abdullah
Ezz El-din Abdullah 2016년 7월 5일
답변: Star Strider 2016년 7월 5일
%Here is my code to plot -x^2 slowly like the comet function:
x = linspace(0,4*pi,100);
for a = linspace(-10,10,200)
y = -(x+a).^2;
plot(x,y,'o')
drawnow;
pause(1/40);
end
So how can I edit it to look like the comet function smoothly?

답변 (1개)

Star Strider
Star Strider 2016년 7월 5일
Plotting it in real time will probably not result in the smoothness you want.
I would experiment with im2frame and movie.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by