Problems with angles between two 3D vector!
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everybody!
I'm analysing data coming from an optoelectronic system which records body movements. I record positions of markers during time and I have to calculate angles like shoulder rotation, elbow flexion/extension, ecc. I'm able to do this using this formula:
ThetaInDegrees = atan2d(norm(cross(u,v)),dot(u,v));
where u and v are two 3D vectors. The movement that I perform is like a sinewave so it goes up and then down several times.
The problem is that sometimes(I don't understand well when) the atan2d formula gives me only crescent values of angles and it seems like the sinewave is rectified, as in the picture below:
How can I manage this problem in order to have a normal sinusoid??
Thanks so much!!
2 commentaires
Jan
le 31 Mai 2019
Without seeing your input data and known, what you exactly expect, all I want to mention is that atan2d works exactly as expected. So if there is a problem, it must be found in your 3D model or in the import of the data.
Think twice: With seeing the code line for a trigonometric formula only, it is impossible to estimate, why the results differ from your expectations.
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!