Find intersection of two x-y tracks given time element

1 次查看(过去 30 天)
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 个评论
Mark Jackson
Mark Jackson 2019-8-19
编辑:Mark Jackson 2019-8-19
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 2019-8-19
It's an interesting problem. Let me know how it works out.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by