How to detect rotation in a trajectory?

2 次查看(过去 30 天)
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 个评论

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2022-5-1
I would use the gradient function to calculate the numerical derivative.
For example:
dydx = gradient(y) ./ gradient(x);
Plot that as a function of ‘x’ as well, and it may provide some clues on how to define that region of the curve.
.

更多回答(1 个)

Sulaymon Eshkabilov
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);

类别

Help CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by