필터 지우기
필터 지우기

comparing consecutive coordinate values in terms of X , Y and Z.

조회 수: 1 (최근 30일)
Pratik Pandya
Pratik Pandya 2018년 11월 6일
댓글: KSSV 2018년 11월 7일
I am trying to compare the consecutive values of centroid(points generated randomly : p = rand(100,3)) in all the three axes individually so as the change in values of consecutive coordinates in any particular axes value leads me to velocity in that particular axes(by using a formula to relate distance with time).Then i wish to find the acceleration from that velocity value so that i have the axis of change in acceleration as well.
Any expert guidance with a descriptive explanation would be appreciated.
  댓글 수: 1
madhan ravi
madhan ravi 2018년 11월 6일
upload your code and required datas and illustrate an example onto where your getting at

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

답변 (1개)

KSSV
KSSV 2018년 11월 6일
N = 100;
P = rand(N,3) ;
% Get distances
d = pdist2(P,P) ;
[Q,idx] = sort(d(:,1)) ; % arrange points according to nearest
P = P(idx,:) ;
  댓글 수: 15
Pratik Pandya
Pratik Pandya 2018년 11월 7일
Let us say we have fixed starting and ending point of the path. But the intermediate points are randomly selected.Now after every time interval (can be frequency also , if it is effective), the change in each coordinate ( in terms of x or y or z) from the previous value should be compared so as to know the distance travelled and the direction as well.once we have the distance covered (and the axis where the coordinate change is observed) we have to find the velocity to show the velocity increase in that direction (x or y or z).and then i want to calculate the acceleration from the velocity values.
KSSV
KSSV 2018년 11월 7일
It is simple right? If A(X1,y1,z1) point is changed to B(X2,y2,z2). Then velocity is given by:
((x2-x1)/dt,(y2-y1)/dt,(z2-z1)/dt).

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

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by