real time point tracking and confining it within a predefined boundary

hi everyone, i need a matlab code to track any point in a 2 dimensional plane and not allowing it to cross a predefined boundary. The boundary,for example, can be defined by x and y coordinates which may be predefined or entered by the user. The point is to move randomly and stay inside that boundary.
Thanks

1 Comment

http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer

Sign in to comment.

Answers (1)

This forum won't just send you MATLAB code without you showing us what you've done so far (as this sounds a bit like homework). To get you started, though, check out
doc inpolygon

Asked:

on 26 Mar 2012

Community Treasure Hunt

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

Start Hunting!