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.
- Double-click on the Joint
- Expand the Actuation section
- Set "Motion" to "Provide by Input"
- Set "Torque to "Automatically Computed"
Then connect the physical signal to the input on the Joint block.
--Steve