MATLAB® interface to the SON library

Discussions and questions about the script language
User avatar
Greg Smith
Major contributor
Posts: 1634
Joined: 19 Jun 2008, 12:27
Software used: Spike2 and Signal
1401 type: Many 1401 types
Location: Cambridge, England

MATLAB® interface to the SON library

Unread postby Greg Smith » 07 May 2014, 14:07

We have just created a MATLAB interface to the 64-bit SON library. This allows users or 32-bit and 64-bit builds of MATLAB to interface to the SON library (as used by Spike2 version 8) and read and write both the new format data files with 64-bit times and the older files (as used by Spike2 version 7 and earlier) with 32-bit times.

This library allows you to read .smr and .smrx data files into MATLAB. It also allows you to create new data files, so could be used to export data from MATLAB into Spike2. The library can be downloaded from the CED website -
Last edited by Greg Smith on 20 May 2014, 15:47, edited 1 time in total.
Greg Smith Cambridge Electronic Design

Posts: 1
Joined: 18 Aug 2016, 07:52

Re: MATLAB® interface to the SON library

Unread postby yuanlaiyuan » 14 Oct 2016, 19:31

Hi Greg,

I use matlab 2016 cccand download the SON libaray, neuroshare DLL. However, it keeps saying the Undefined function or variable 'mexprog'. Do you know it is the problem for the matlab mex complier or the DLL doesn't work in the high version . Thanks,



User avatar
Tim Bergel
Site Admin
Posts: 2381
Joined: 19 Jun 2008, 14:40
Location: Cambridge, England

Re: MATLAB® interface to the SON library

Unread postby Tim Bergel » 20 Oct 2016, 12:18

Hi Yuanyuan,

I'm not entirely sure what you are doing here and what software you are using for what. You seem to have too much software!

The MATLAB SON support library is a library of MATLAB functions (m files) plus an interface DLL to the SON64 DLL. It gives a direct interface from MATLAB to SON (smrx) files and is downloaded from the CED web site. It also comes with a number of example MATLAB programs and your first aim should be to get them to work correctly - which should be easy but there may be hitches.

Neuroshare is completely different. It is an interface which different programs (including MATLAB) can use to open data files generated by different programs (including Spike2). So if you are using a MATLAB program which uses NeuroShare files and want to look at smrx data you would need to install the CED NeuroShare interface (again, downloaded from the CED web site) and configure the MATLAB program to use it.

You mentioned the error "Undefined function or variable 'mexprog'". What software is generating this and when?

Do feel free to get back to me for more information. However if you do, please can you give me a more complete description of what you are trying to do, what software you are using to do it, and how you are trying to achieve your aims.
Tim Bergel Cambridge Electronic Design

Return to “Script language”

Who is online

Users browsing this forum: No registered users and 2 guests