How to detect rotation in a trajectory?
Show older comments
I have to write an algorithm to detect rotation in the trajectory. Basically, I have to detect the red zone in the trajectory. Currently I have the time and coordinate data.

How do I approach it?
4 Comments
DGM
on 30 Apr 2022
How is the trajectory defined?
What criteria are used to determine whether a change in direction constitutes "rotation"?
Atanu
on 30 Apr 2022
Riccardo Scorretti
on 30 Apr 2022
You are working in a 2D or 3D space?
Atanu
on 1 May 2022
Accepted Answer
More Answers (1)
Sulaymon Eshkabilov
on 1 May 2022
One way of detecting the region of values is using logical indexing, e.g.:
t = ...
x = ...
y = ...
% Way 1
Ind = t>=0 & t<=5; % Select the region according to the time data
Xs = x(Ind);
Ys = y(Ind);
% Way 2
Ind = x>=0 & x<=5; % Select the region according to x data
Xs = x(Ind);
Ys = y(Ind);
Categories
Find more on Geographic Plots 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!