How to define joint angles in a .mat file

3 次查看(过去 30 天)
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

回答(1 个)

Steve Miller
Steve Miller 2021-10-25
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

类别

Help CenterFile Exchange 中查找有关 Multibody Dynamics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by