Matlab interface
Matlab interface
Hello,
I am trying to configure the interface between MATLAB and OpenSim. I followed the instruction of manual configuration (http://simtk-confluence.stanford.edu:80 ... ith+Matlab). I tried the command:
import org.opensim.modeling.*
and there was no error.
When I tried : org.opensim.modeling.Model OR methods Model
I got :
undefined variable "org" or class "org.opensim.modeling.Model" OR No class Model.
Can anyone advice?
Thanks alot
I am trying to configure the interface between MATLAB and OpenSim. I followed the instruction of manual configuration (http://simtk-confluence.stanford.edu:80 ... ith+Matlab). I tried the command:
import org.opensim.modeling.*
and there was no error.
When I tried : org.opensim.modeling.Model OR methods Model
I got :
undefined variable "org" or class "org.opensim.modeling.Model" OR No class Model.
Can anyone advice?
Thanks alot
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Matlab interface
Make sure that your Matlab setup is working properly by running some of the scripts in \Scripts\Matlab folder. If you have configured Matlab with OpenSim correctly then you need to import the OpenSim libraries before using them:
Code: Select all
import org.opensim.modeling.*
Re: Matlab interface
It was not working with the examples even that I used ---> import org.opensim.modeling.* before the code.
The problem was in the PC administrator rights. I have sorted it out
Many thanks
The problem was in the PC administrator rights. I have sorted it out
Many thanks
- Mritula Chandrasekaran
- Posts: 94
- Joined: Tue Dec 19, 2017 5:36 am
Re: Matlab interface
Hi There,
I am facing the same problem as well. Can you help me how to work it out? I did "import org.opensim.modeling.* " this did not give an error.
But when I do model=org.opensim.modelling.Model()
Undefined variable "org" or class "org.opensim.modelling.Model". It gives an error.
Thanks,
Mritula
I am facing the same problem as well. Can you help me how to work it out? I did "import org.opensim.modeling.* " this did not give an error.
But when I do model=org.opensim.modelling.Model()
Undefined variable "org" or class "org.opensim.modelling.Model". It gives an error.
Thanks,
Mritula
- Thomas Uchida
- Posts: 1789
- Joined: Wed May 16, 2012 11:40 am
Re: Matlab interface
That line gives me an error as well because "modelling" should be spelled "modeling". Regardless, if you've imported the OpenSim libraries with "import org.opensim.modeling.*", you just need to do this:But when I do model=org.opensim.modelling.Model()
Code: Select all
import org.opensim.modeling.*;
model = Model();
- "Scripting": https://simtk-confluence.stanford.edu/d ... /Scripting
- "Common Scripting Commands": https://simtk-confluence.stanford.edu/d ... g+Commands
- "Scripting with Matlab": https://simtk-confluence.stanford.edu/d ... ith+Matlab
- Mritula Chandrasekaran
- Posts: 94
- Joined: Tue Dec 19, 2017 5:36 am
Re: Matlab interface
Thanks for that. Silly me. Sorry. It worked now. It gave me an output as
model =
model
Is this all that was expected?
Thanks,
Mritula
model =
model
Is this all that was expected?
Thanks,
Mritula
- Thomas Uchida
- Posts: 1789
- Joined: Wed May 16, 2012 11:40 am
Re: Matlab interface
Please see the example scripts here: https://simtk-confluence.stanford.edu/d ... pleScripts
- Mritula Chandrasekaran
- Posts: 94
- Joined: Tue Dec 19, 2017 5:36 am
Re: Matlab interface
Hi,
Where can I find details about the package org.opensim.modeling. I want to create a simple model representing a plain skeletal figure in Opensim. How can I do that? I tried through the examples in Matlab. They have C++ codes inside them. But most of them are from the above package. Where can I find any documentation related to it listing the details of the methods in this pacakage.
Thanks
Mritula
Where can I find details about the package org.opensim.modeling. I want to create a simple model representing a plain skeletal figure in Opensim. How can I do that? I tried through the examples in Matlab. They have C++ codes inside them. But most of them are from the above package. Where can I find any documentation related to it listing the details of the methods in this pacakage.
Thanks
Mritula
- Thomas Uchida
- Posts: 1789
- Joined: Wed May 16, 2012 11:40 am
Re: Matlab interface
The main OpenSim documentation page is here: https://simtk-confluence.stanford.edu/d ... umentation
The User's Guide is here: https://simtk-confluence.stanford.edu/d ... er's+Guide
The most relevant documentation for Matlab scripting users can be found here:
- "Common Scripting Commands" (https://simtk-confluence.stanford.edu/d ... g+Commands)
- "Scripting with Matlab" (https://simtk-confluence.stanford.edu/d ... ith+Matlab)
The programmer's documentation is here: https://simtk.org/api_docs/opensim/api_docs/
Some additional information can be found on GitHub: https://github.com/opensim-org/opensim-core
The User's Guide is here: https://simtk-confluence.stanford.edu/d ... er's+Guide
The most relevant documentation for Matlab scripting users can be found here:
- "Common Scripting Commands" (https://simtk-confluence.stanford.edu/d ... g+Commands)
- "Scripting with Matlab" (https://simtk-confluence.stanford.edu/d ... ith+Matlab)
The programmer's documentation is here: https://simtk.org/api_docs/opensim/api_docs/
Some additional information can be found on GitHub: https://github.com/opensim-org/opensim-core