I am trying to write a script on MATLAB but I encounter problems. The objective of this code would be to:
- plot normalized fiber length
- plot velocity fiber
- plot muscle activation
- plot tendon length
In relation to time (from a model and an associated motion), for each muscle of triceps surae muscular group (med_gas_r, lat_gas_r, soleus_r).
I have loaded the model and the motion. On OpenSim, I directly made the Static Optimization and Analyse. Thus, on my computer, I have some files .STO with data.
As a first step, I tried to use the function getNormalizedFiberLength but I obtained the following error:
"Incorrect number or types of inputs or outputs for function getNormalizedFiberLength."
- Does this function actually exist on MATLAB?
- Have you some examples of scripts doing that? I didn't find on internet.
- Or can you tell me how use this function correctly, please?
- Also, which function can I use to extract the velocity fiber and the muscle activation please?
I found getTendonLength for the tendon length.
On my script, I have written the following lines for importing the libraries:
% Import OpenSim libraries
import org.opensim.modeling.*
opensimLibPath = 'C:\Users\Juliet M\Desktop\OpenSim 4.4\sdk\';
javaaddpath(opensimLibPath);
- Maybe there is something missing?
Also, on my script, getMuscles() works but maybe it is not necessary for what I want to do.
I really need an explanation.
I thank you very much in advance, I will be very grateful for your help!
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Juliet
(I am using MATLAB 64-bit, OpenSim 4.4 on Windows)