How to detect rotation in a trajectory?

조회 수: 4 (최근 30일)
Struggling in MATLAB
Struggling in MATLAB 2022년 4월 30일
댓글: Star Strider 2022년 5월 2일
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
Riccardo Scorretti
Riccardo Scorretti 2022년 4월 30일
You are working in a 2D or 3D space?
Struggling in MATLAB
Struggling in MATLAB 2022년 5월 1일
2-D space.

댓글을 달려면 로그인하십시오.

채택된 답변

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.
.
  댓글 수: 2
Struggling in MATLAB
Struggling in MATLAB 2022년 5월 2일
Thanks for your input. I think this will work.
Star Strider
Star Strider 2022년 5월 2일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022년 5월 1일
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