필터 지우기
필터 지우기

Animating collision GUI - changing position

조회 수: 2 (최근 30일)
Margaret Norbut
Margaret Norbut 2017년 4월 13일
답변: Sam McDonald 2017년 4월 19일
Hi! we have a project to create a GUI of our choice and our group is doing a collisions. We are trying to move the two circles plotted based on the velocity inputted by the user. It has been suggested that we create a position vector and update it in a loop based on the velocity but I am just a little confused about how to go about this. Any thoughts??

답변 (1개)

Sam McDonald
Sam McDonald 2017년 4월 19일
There are a few techniques for creating animations in MATLAB. Refer to these links for examples:
For your specific case, updating a position vector according to the time that has passed is a good approach. MATLAB has a timer object available for use, or you could simply use the "pause" function to get started. Here are some more useful links:

카테고리

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