My current GUI has a paddle moving back and forth on the X-aixis, its controlled my an accelerometer. I'm was wondering how would you get a number of falling object starting from the top of the window and fall at random speeds? And the number of falling objects increase with time?

답변 (2개)

Image Analyst
Image Analyst 2014년 3월 8일

0 개 추천

MATLAB offers a rand() function to generate random numbers, and various timing functions like tic and toc, and clock() or now(). It should be easy for you to do what you ask if you just use those built in functions.
Walter Roberson
Walter Roberson 2014년 3월 8일

0 개 추천

image() them into place. Change the image object's xdata and ydata properties to move them.
If you need them to rotate as well, the easiest way would probably be to use a hgtransform to hold the image object.

카테고리

도움말 센터File Exchange에서 Object Containers에 대해 자세히 알아보기

질문:

2014년 3월 8일

답변:

2014년 3월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by