Find intersection of two x-y tracks given time element

3 visualizaciones (últimos 30 días)
Mark Jackson
Mark Jackson el 18 de Ag. de 2019
Editada: Adam Danz el 19 de Ag. de 2019
I have two tracks defined by x-y coordinates in which I would like to establish the crossing points. This appears to be relatively easy using several of the submissions on File Exchange such as Intersection and InterX . This submission a list of the x and y values of the crossing points. However it doesn’t take into account time. Let me explain....
Suppose my two tracks are for a cat and a mouse. The tracks explain where both the cat and mouse have been as a function of time using x-y coordinates. Let’s now suppose that I know that the cat always trails the mouse - that is to say that the mouse is always ahead of the cat as a function of time, never the other way round. Is there a quick way (like the File Exchange link I show) to calculate only crossing points where the cat crosses the mouses trail, not the mouse crossing the cats trail.
One solution would be to return x-y-time triplets which I could then filter to ensure the cat is behind the mouse. But I’m not sure how I could make a fast running function of this nature
  7 comentarios
Mark Jackson
Mark Jackson el 19 de Ag. de 2019
Editada: Mark Jackson el 19 de Ag. de 2019
I hadn’t thought about the iout and jout returns. The function returns all crossing points but I was assumed it only returned x-y so repeated crossing points would be indistinguishable (in terms of time). With iout and jout it should be easy to pick out the times and then check whether mouse is ahead of cat or vice-versa. Thanks for your help! I’ll try it today and let you know how I get on
Adam Danz
Adam Danz el 19 de Ag. de 2019
It's an interesting problem. Let me know how it works out.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by