MATLAB Help dog chasing a man in matlab

  • Thread starter Thread starter center15
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion centers on creating a MATLAB algorithm to simulate a pursuit scenario between a man and a dog. The man starts at a specific location and moves in a straight line at a constant speed and angle. The dog, starting from a different location, moves directly towards the man, adjusting its path based on the man's position. The algorithm should track the number of steps until the dog can catch the man, terminating once the distance allows for a catch in the next step. Additional complexity can be added by allowing for variable accelerations for both the man and the dog. Participants suggest using a for loop to update positions at each time step, referencing the concept of Pursuit Curves for guidance. The main request is for assistance in writing the MATLAB code to implement this simulation effectively.
center15
Messages
2
Reaction score
0
I need help? can anybody help me? I have to use Matlab. I am giving details of problem.

-a man starts in some initial location (xm,ym) and moves with a constant speed along the straight line of the predefined angle.
-a dog starts in another initial location (xd,yd) and moves towards a man with a constant speed in such a way that in each step it moves directly along the line connecting the current positions of a dog and a man
-the algorithm should terminate after the man’s move, if the distance between the man and the dog allows the dog to catch the man in its next step
-extra marks will be given if your implementation allows setting not only the initial velocity, but also the accelerations of both man and a dog.
-the algorithm must output the number of steps in which the dog catches the man.


http://pics-68.hi5.com/userpics/468/...799468.img.jpg
 
Last edited by a moderator:
Physics news on Phys.org
Try to indicate what you need help with.

You will use a for loop to go through time steps, and each step you will update the position of the dog and the man according to their velocities.
 
I know that but how can I write kods in matlab?
 
Back
Top