https://github.com/neuroml/neuromltoolbox
NeuroML 2 toolbox for MATLAB
https://github.com/neuroml/neuromltoolbox
Last synced: 3 months ago
JSON representation
NeuroML 2 toolbox for MATLAB
- Host: GitHub
- URL: https://github.com/neuroml/neuromltoolbox
- Owner: NeuroML
- Created: 2017-01-05T09:48:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-11-30T14:13:03.000Z (over 2 years ago)
- Last Synced: 2025-02-06T09:25:48.224Z (over 1 year ago)
- Size: 9.77 KB
- Stars: 1
- Watchers: 10
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NeuroML Toolbox
The NeuroML 2 toolbox for MATLAB works by facilitating access to the [Java NeuroML 2 API][jNeuroML] functionality directly within Matlab.
## Installation
Install [jNeuroML][] following the instructions at https://github.com/NeuroML/jNeuroML.
The quickest route is to go to https://github.com/NeuroML/jNeuroML/releases,
download the latest jNeuroML.zip file, and unzip somewhere suitable on your machine.
Run Matlab and run the `prefdir` command to find the location of your preferences folder.
Create a file `javaclasspath.txt` within that folder containing, on a single line,
the full path to the `jNeuroML--jar-with-dependencies.jar` file you unpacked above.
For example, on my Mac the preferences folder is
```
/Users/name/Library/Application Support/MathWorks/MATLAB/R2016b
```
and so I created `/Users/name/Library/Application Support/MathWorks/MATLAB/R2016b/javaclasspath.txt` containing
```
/Users/name/projects/jNeuroMLJar/jNeuroML-0.7.7-jar-with-dependencies.jar
```
The specific paths will vary on your machine.
Now restart Matlab and it will know how to find the jNeuroML classes.
You can test that it is working by trying to validate a NeuroML file:
```matlab
import org.neuroml.model.util.NeuroML2Validator
file = java.io.File('/full/path/to/model.nml');
validator = NeuroML2Validator();
validator.validateWithTests(file);
disp(validator.getValidity())
```
## Examples
There are further examples of usage in [examples/run_examples.m](examples/run_examples.m).
[jNeuroML]: https://github.com/NeuroML/jNeuroML