How to center a cloud of data points (x,y,z) to coordinate origin in 3-D space?
1 次查看(过去 30 天)
显示 更早的评论
For gait analysis, I have multiple markers moving in 3-D space during the duration of 10 seconds and I'd like to center the each marker's 3-D coordinate (x,y,z) around the origin of coordinate (0,0,0). I'm wondering if there's a toolbox/function to achieve this?
For simplicity, I'll attach an example of 10 ms of one marker.
X (mm) y (mm) z (mm)
167.282166 372.896698 389.281158
167.471191 372.208740 389.362701
167.996216 372.071564 389.467804
168.180084 371.414276 389.551056
168.273346 370.742065 389.593597
168.421082 370.094299 389.734467
168.310608 369.163635 389.730011
168.288498 368.446075 389.701782
168.616959 368.038177 389.85672
168.659393 367.369171 389.916443
0 个评论
采纳的回答
Jan
2021-12-19
I'm not sure, what "center each marker" means. But I assume you want to subtract the mean value:
trajectory = [167.282166 372.896698 389.281158; ...
167.471191 372.208740 389.362701; ...
167.996216 372.071564 389.467804; ...
168.180084 371.414276 389.551056];
centered_trajectory = trajectory - mean(trajectory, 1);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specialized Messages 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!