How to create an animation between 3 points

조회 수: 1 (최근 30일)
Yu-Wei Tu
Yu-Wei Tu 2021년 5월 22일
답변: darova 2021년 5월 23일
Hi! I want to make animation of a line between 3 points. Let's say point 1 is (0,0,0) and point 2 is (5,4,1). How can I create an animate line between them and plot the final point(b) in the plot as well?

답변 (2개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 5월 22일
Use drawnow.

darova
darova 2021년 5월 23일
See this example
x = 0:10;
y = sin(x);
for i = 1:lengh(x)
plot(x(1:i),y(1:i))
pause(0.2)
end

카테고리

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