How can I store the places of two different points at two different time?
Show older comments
Hello,
I have to measure a distance between two points. I have to see where the solution across some values quite small, like 0.01. In other words, there should be the first point which is like (x(150), 0.01) at t=150 and the second one should be (x(200), 0.01) at t=200. Distance should be equal (x(200)-x(150)) because y-values are the same.
My problem is that how can I store/ calculate the x(150) and x(200) places when the time reaches to t=150 and t=200, respectively?
I will be very glad if someone can answer my question.
Many thanks in advance.
Accepted Answer
More Answers (1)
Amina
on 29 Mar 2018
0 votes
1 Comment
Elias Gule
on 29 Mar 2018
That should not be a problem; because as long as you know the time at which you want a corresponding x-value, the code that I supplied simply applies logical indexing to map that particular time instance to a corresponding position.
let's say for example, that, at t= 1507, the x-value is 1663, the code will be able to map these two values, as long as the t-vector and the x-vector has the same length.
The assumption that I'm making here is that the elements in the t- and x-vectors are mapped position-wise.
Thanks.
Categories
Find more on Orange in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!