File Exchange

image thumbnail

3D Kinematics and Inverse Dynamics

version 2.2 (733 KB) by Raphael Dumas
Computations of joint angles and displacements, moments and forces (lower / upper limb)


Updated 24 Nov 2019

View Version History

View License

This toolbox contains all the Matlab functions for 3D kinematics and inverse dynamics computation applied to the lower and upper limb. The right lower (upper) limb is considered for sign conventions.
For instance, this toolbox includes functions for multibody optimisation with different joint models (noted N, S, U, and H for no model, spherical, universal and hinge models) and functions for inverse dynamics with different methods: vector and Euler angle (noted VE), homogenous matrix (noted HM), wrench and quaternion (noted WQ), generalized (i.e., natural) coordinate (noted GC).
The computations are performed avoiding loops on the sampled instants of time and, thus, require a set of custom-made functions (*_array3.m) for matrix/vector basic operations.

This toolbox also includes an example dataset (*.mat files to be loaded) for gait and manual wheelchair propulsion) and a series of demonstrations (Main_Question_*.m).

Cite As

Raphael Dumas (2021). 3D Kinematics and Inverse Dynamics (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (15)

Kazem Malmir

Dear Raphael,
Thanks a lot for the toolbox.
Please give more detail about constructing the Segment.mat file.
Please guide me about it or put required scripts for constructing the segment parameters.
Thank you very much.

jiseok choi

Dear Raphael Dumas.
Thank you for this toolbox.
I am trying to calculate the input data(centre of mass, inertia tensor).
In segment data, Is of shank and rCs of foot are different from what i calculated.
I calculated these data using your paper(Adjustments to McConville et al. and Young et al. body segment inertial parameters).
Please answer if these data in the toolbox are correct.

jiseok choi

Cortney Armitano

Thank you for this toolbox. I may be missing it, but is there a function that can calculate the segment orientation from the joint position?

dong hee cho

Thank you for providing the code and wondering how you got the position of the center of mass.


vinutha sampaath

I am getting error as not enough input arguements when i am trying to run jointkinematics.m
Kindly help me how o use this toolbox.

I am using marker data and trying to write my own kinematics and kinetics code for human gait.

I am stuck in dynamics part how to write coding for inverse dynamics to find torque and power

Raphael Dumas

How to build the data structure is depending on the marker set used during motion capture, the regressions/methods used to estimate the joint centres and axes and the body segment inertial parameters.
There is no general code for that but the User Guide in the toolbox provide some information (pages 45-50).
Two exemples of the data structure (lower limb and upper limb) are also provided.

Aghaiee Peyman

Hi Dear Raphael Dumas
How can I get the data structure? Is there any MATLAB code for me?
please answer to our question

Chuan He

Chuan He

Thank you for this masterpiece. How can I get the data structure? Is there any MATLAB code for me?

Don Carlson

Please re-upload to add demonstration .mat files for joints and segments or instructions on creating these files. The current data set seems to only contain shortcuts to a non-existent file.


I wang

Did not known, how to make structure of Joint.mat and Segment.mat

Ke Hong

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!