Hi Soliday,
I am trying to use Matlab SDDS in mac system, I looked up the "Guide to Installing SDDS support for Matlab" in the website, there are no instructions for macOS system. And I cannot find the Java SDDS Binary for macOS, is Matlab SDDS not supported in macOS system ?
Matlab SDDS in macOS Sierra (10.12.6) system
Re: Matlab SDDS in macOS Sierra (10.12.6) system
I don't have access to Matlab on macOS but I suspect the setup is similar.
You will need the SDDS.jar file first. I have a few standalone versions already built that should work.
SDDS.java.1.7.0.111.jar
SDDS.java.1.8.0.144.jar
I seem to recall that you need to have the SDDS.jar file that was built with the matching version of java included with Matlab. You can test this with:
>> version -java
Then download the right SDDS.jar file above, either the 1.7 or 1.8 version. You can then to rename it to SDDS.jar.
You will also need the matlab .m files. You can get these in the SDDS.3.5.1.tar.gz package. They are in the epics/extensions/src/SDDS/matlab directory.
Assuming you create a /usr/local/SDDS directory for all the needed files, the commands to use it would look like:
>> javaaddpath('/usr/local/SDDS/SDDS.jar', '-end')
>> import SDDS.java.SDDS.*
>> path(path,'/usr/local/SDDS/matlab')
>> sddsdata = sddsload('testfile.sdds')
You will need the SDDS.jar file first. I have a few standalone versions already built that should work.
SDDS.java.1.7.0.111.jar
SDDS.java.1.8.0.144.jar
I seem to recall that you need to have the SDDS.jar file that was built with the matching version of java included with Matlab. You can test this with:
>> version -java
Then download the right SDDS.jar file above, either the 1.7 or 1.8 version. You can then to rename it to SDDS.jar.
You will also need the matlab .m files. You can get these in the SDDS.3.5.1.tar.gz package. They are in the epics/extensions/src/SDDS/matlab directory.
Assuming you create a /usr/local/SDDS directory for all the needed files, the commands to use it would look like:
>> javaaddpath('/usr/local/SDDS/SDDS.jar', '-end')
>> import SDDS.java.SDDS.*
>> path(path,'/usr/local/SDDS/matlab')
>> sddsdata = sddsload('testfile.sdds')
Re: Matlab SDDS in macOS Sierra (10.12.6) system
Hi Soliday,
Thank you, it works, really cool. It seems every time when I reopen the Matlab and want to use sddsload function, I should run
So I add these two line command to the top of sddsload.m file. It works.
Is there any other way to save the javapath so I need not to add it every time ?
Thank you, it works, really cool. It seems every time when I reopen the Matlab and want to use sddsload function, I should run
Code: Select all
javaaddpath('/usr/local/SDDS/SDDS.jar', '-end')
import SDDS.java.SDDS.*
Is there any other way to save the javapath so I need not to add it every time ?
Re: Matlab SDDS in macOS Sierra (10.12.6) system
Hi Soliday,
Thank you, it works, really cool. It seems every time when I reopen the Matlab and want to use sddsload function, I should run
So I add these two line command to the top of sddsload.m file. It works.
Is there any other way to save the javapath so I need not to add it every time ?
Thank you, it works, really cool. It seems every time when I reopen the Matlab and want to use sddsload function, I should run
Code: Select all
javaaddpath('/usr/local/SDDS/SDDS.jar', '-end')
import SDDS.java.SDDS.*
Is there any other way to save the javapath so I need not to add it every time ?
Re: Matlab SDDS in macOS Sierra (10.12.6) system
You can add it to the Matlab classpath file if you can figure out where that is on macOS.
Re: Matlab SDDS in macOS Sierra (10.12.6) system
Hi Soliday,
After edited the javaclasspath.txt, it works. In case someone wants to know the details, I posted the process here:
And write "/usr/local/SDDS/SDDS.jar" into the txt file, save it and restart Matlab. The new path will be saved to the static path.
Thanks a lot. Happy Christmas and have a good holiday!
After edited the javaclasspath.txt, it works. In case someone wants to know the details, I posted the process here:
Code: Select all
>>cd(prefdir)
>>edit javaclasspath.txt
Thanks a lot. Happy Christmas and have a good holiday!