Matlab SDDS in macOS Sierra (10.12.6) system

Moderators: cyao, soliday

Post Reply
Biaobin
Posts: 29
Joined: 17 Feb 2017, 09:03

Matlab SDDS in macOS Sierra (10.12.6) system

Post by Biaobin » 21 Dec 2017, 01:36

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 ?

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: Matlab SDDS in macOS Sierra (10.12.6) system

Post by soliday » 21 Dec 2017, 11:44

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')

Biaobin
Posts: 29
Joined: 17 Feb 2017, 09:03

Re: Matlab SDDS in macOS Sierra (10.12.6) system

Post by Biaobin » 21 Dec 2017, 13:56

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

Code: Select all

javaaddpath('/usr/local/SDDS/SDDS.jar', '-end')
import SDDS.java.SDDS.*
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 ?

Biaobin
Posts: 29
Joined: 17 Feb 2017, 09:03

Re: Matlab SDDS in macOS Sierra (10.12.6) system

Post by Biaobin » 21 Dec 2017, 13:56

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

Code: Select all

javaaddpath('/usr/local/SDDS/SDDS.jar', '-end')
import SDDS.java.SDDS.*
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 ?

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: Matlab SDDS in macOS Sierra (10.12.6) system

Post by soliday » 21 Dec 2017, 13:59

You can add it to the Matlab classpath file if you can figure out where that is on macOS.

Biaobin
Posts: 29
Joined: 17 Feb 2017, 09:03

Re: Matlab SDDS in macOS Sierra (10.12.6) system

Post by Biaobin » 21 Dec 2017, 14:43

Hi Soliday,

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
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!

Post Reply