How to define joint angles in a .mat file

2 visualizaciones (últimos 30 días)
NAVJOT SINGH
NAVJOT SINGH el 16 de Jul. de 2020
Respondida: Steve Miller el 25 de Oct. de 2021
I want to define joint angles in the mat file and then I want to use it in simscape multibody. I am working on a human body and I want to perform sit to stand motion. I have to define joint angles for knee,ankle and hip, for which I will need to define joint angles for each of these in separate mat files and then use them as inputs for the revolute joints. But how to do this.Any help will be appreciated. Thanks

Respuestas (1)

Steve Miller
Steve Miller el 25 de Oct. de 2021
You can save any numerical data to a .mat file using the save command.
You load that file using the load command.
Once the variables are in the MATLAB workspace, you can use a From Workspace block to refer to those values as a Simulink signal. Connect that signal to a Simulink-PS Converter block to convert it to a Physical Signal.
The joint needs to be configured for motion actuation.
  1. Double-click on the Joint
  2. Expand the Actuation section
  3. Set "Motion" to "Provide by Input"
  4. Set "Torque to "Automatically Computed"
Then connect the physical signal to the input on the Joint block.
--Steve

Categorías

Más información sobre Multibody Dynamics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by