Search found 19 matches

by Mohammadhossein Akhavanfar
Mon Nov 22, 2021 1:44 pm
Forum: OpenSim
Topic: Running Static Optimization in Matlab
Replies: 6
Views: 1673

Re: Running Static Optimization in Matlab

The only problem of the zip file is this line:

at.setForceSetFiles(ArrayStr(forceSetFileName));

The input of setForceSetFiles should be an ArrayStr. However, the way it was constructed is wrong. That line should be replaced with this:

A=ArrayStr();
A.set(0,forceSetFileName);
at.setForceSetFiles(A);
by Mohammadhossein Akhavanfar
Wed Mar 24, 2021 8:55 am
Forum: MATLAB-based framework for implementing mechanical joint stability within SO
Topic: Error using IDAnalysis
Replies: 1
Views: 212

Re: Error using IDAnalysis

Hello Mojtaba, It's probably because you didn't change the directory path in the xml file setup or you put a wrong directory in the first lines of the main file. Please open External_Load.xml. Then, in the <datafile> section, copy and paste the right directory in your computer. Attached is the pic o...
by Mohammadhossein Akhavanfar
Fri Mar 19, 2021 5:34 am
Forum: MATLAB-based framework for implementing mechanical joint stability within SO
Topic: Opensim version 4.0
Replies: 3
Views: 562

Re: Opensim version 4.0

Hi, I just downloaded again and run it and it works. I guess the folder that you put the setup files is not correct or you have not changed the folder names in the main.m code. I just downloaded my codes in my laptop desktop and changed the directories as follows: main.PNG As it says % PointKinemati...
by Mohammadhossein Akhavanfar
Mon Aug 26, 2019 7:41 am
Forum: MATLAB-based framework for implementing mechanical joint stability within SO
Topic: Opensim version 4.0
Replies: 3
Views: 562

Re: Opensim version 4.0

Hello,
This code was written for OpenSim 3.3. I believe it should also work for OpenSim 4, unless many commands have been changed. Would you please explain more about the model and the error you get that I might help you with.
by Mohammadhossein Akhavanfar
Wed Mar 13, 2019 4:26 pm
Forum: OpenSim
Topic: Changing ArrayDouble to Matrix in MATLAB
Replies: 1
Views: 247

Changing ArrayDouble to Matrix in MATLAB

Hello All, I am working with OpenSim API through MATLAB. If A is my storage, I use this command to get states vector @ time t: B=A.getStateVector(t-1); C=B.getData(); C is an arraydouble variable. I can access to the element m by this command: C.getitem(m-1) However, I don't want to use a for loop t...
by Mohammadhossein Akhavanfar
Wed Feb 06, 2019 7:53 am
Forum: OpenSim
Topic: Getting Analysis tool results as MATLAB variables
Replies: 3
Views: 1376

Re: Getting Analysis tool results as MATLAB variables

Hi Dimitar, Thank you very much for your response and the python code. Is there anyway to get the states of the system as a MATLAB matrix during the simulation? I mean, e.g. for Inverse Dynamic, I can get a matrix (number of time instants * number of coordinates) of generalized forces. Right now, wh...
by Mohammadhossein Akhavanfar
Tue Feb 05, 2019 12:32 pm
Forum: OpenSim
Topic: Getting Analysis tool results as MATLAB variables
Replies: 3
Views: 1376

Getting Analysis tool results as MATLAB variables

Hi, I can run different analysis tools (i.e. inverse dynamic, point kinematic, muscle analysis, etc.) through MATLAB by API. However, to use the generated results in MATLAB, I have to open the results from above analysis tools in MATLAB using importdata function. For example, A=importdata(PointKinem...
by Mohammadhossein Akhavanfar
Mon Jun 04, 2018 8:26 am
Forum: OpenSim
Topic: force-length-velocity surface
Replies: 1
Views: 288

force-length-velocity surface

Hi All, I have two questions and appreciate if someone could help me with them. Based on confluence's documents, for static optimization procedure in OpenSim, we could consider force-length-velocity properties of muscles. https://simtk-confluence.stanford.edu/display/OpenSim/How+Static+Optimization+...
by Mohammadhossein Akhavanfar
Tue Feb 20, 2018 1:33 pm
Forum: OpenSim
Topic: Static Optimization conditions
Replies: 2
Views: 301

Re: Static Optimization conditions

Hi Tom,

Thank you for your response. I see your point.
by Mohammadhossein Akhavanfar
Wed Feb 14, 2018 2:06 pm
Forum: OpenSim
Topic: Computing Muscle Moment Arms
Replies: 1
Views: 296

Computing Muscle Moment Arms

Dear sir/Madam, I have my inverse kinematic results (.mot) and I want to compute muscle moment arms around each coordinate in each time step using MATLAB. As I understood, Muscle.computeMomentArm(State , Coordinate) is a function that can do this for each muscle and the inputs of this class are a st...