Help dog chasing a man in matlab

  • Context: MATLAB 
  • Thread starter Thread starter center15
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary

Discussion Overview

The discussion revolves around a problem involving simulating the movement of a man and a dog in MATLAB, where the dog chases the man based on their respective speeds and positions. The focus is on implementing an algorithm that calculates the number of steps it takes for the dog to catch the man, with additional complexity introduced by the possibility of varying accelerations.

Discussion Character

  • Homework-related, Technical explanation

Main Points Raised

  • One participant outlines the problem, specifying the initial positions and movement dynamics of both the man and the dog.
  • Another participant suggests using a for loop to update the positions of the man and dog at each time step based on their velocities.
  • A third participant identifies the scenario as resembling a discretized version of a Pursuit Curve, referencing external material for further context.
  • A later reply expresses a need for assistance with writing the code in MATLAB, indicating a gap in programming knowledge or experience.

Areas of Agreement / Disagreement

Participants generally agree on the nature of the problem and the approach to solving it, but there is no consensus on the specific coding implementation or techniques to be used in MATLAB.

Contextual Notes

The discussion lacks detailed assumptions about the parameters involved, such as the specific values for speeds and angles, and does not resolve the mathematical steps required for the simulation.

Who May Find This Useful

Individuals interested in MATLAB programming, simulation of motion dynamics, or pursuit problems in mathematics may find this discussion relevant.

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?
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
2K
Replies
2
Views
903
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 26 ·
Replies
26
Views
7K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 7 ·
Replies
7
Views
4K