Open FFroehlich opened 7 years ago
hello Fabian,
unfortunately the matlab bindings will have to wait for a little while longer. SWIG ha no support for matlab bindings at this point, so we would have to write our own generator for it. We are in the process of doing that, but I am unsure when a release will be publicly available, i would not expect it to be before Q3 2017. I'll keep this thread posted when there is any change.
In the meantime you could still use the java bindings directly from matlab and call them.
best Frank
hi Frank,
on the swig git is sounds like the matlab module is coming relatively soon (apparently only the documentation is missing https://github.com/jaeandersson/swig/issues/9).
Using the java bindings in the meantime sounds like an excellent idea!
Best, Fabian
As I found it quite challenging to get the matlab bindings running I thought it might be helpful to have the following guide (for OS X) for other people who want to try:
important files: libsedmlj.jnilib: default location is /usr/local/lib libsedmlj.jar: default location is /usr/local/share/java
To correctly load the native libraries in matlab we need to create a wrapper class. For this create a file loadsedml.java with the following contents:
public class loadsedml {
static {
java.lang.System.loadLibrary("sedmlj");
}
}
compile this as loadsedml.class file by calling javac -target 1.5 -source 1.5 loadsedml.java
For me trying to load the java native library using java.lang.System.loadLibrary or java.lang.System.load directly from matlab did not work. Explicitely configuring target and source java version ensures that the class is loadable in the matlab JRE which can easily be older than the system JRE.
edit $matlabroot/classpath.txt and add the absolute paths to libsedmlj.jar (e.g. /usr/local/share/java/libsedmlj.jar) and the compiled loadsedml.class
edit $matlabroot/classpath.txt and add the folder that contains libsedmlj.jnilib (e.g. /usr/local/lib)
in order for the changes to take effect you need to restart matlab now
call loadsedml;
after that the class org.sedml.libsedml.libsedml should be available
I would like to request MATLAB bindings for this library! I would be happy to do any testing if necessary.