Read mcd data in a 64bit system by matlab
3 posters
Page 1 of 1
Read mcd data in a 64bit system by matlab
Hi all,
I use matlab version7.10.0 (R2010a) to read mcd data, it works well, and the system is 32bit, using the functions in the C:\Program Files\Multi Channel Systems\MCRack\MCStreamSupport\Matlabx.
However, when I use the same functions under a 64bit system (matlab version 7.12.0(R2011)) to read mcd data by ‘datastrm’, matlab reported it cannot find the MCStreamMEX, the folder has been under the path.
Is there any differences using the MCStreamMEX.dll to read the data between 32bit and 64bit system or the higher matlab version has not support the .dll function? If it is, how can I read the mcd data file in a 64bit system by matlab?
Thanks in advance!
I use matlab version7.10.0 (R2010a) to read mcd data, it works well, and the system is 32bit, using the functions in the C:\Program Files\Multi Channel Systems\MCRack\MCStreamSupport\Matlabx.
However, when I use the same functions under a 64bit system (matlab version 7.12.0(R2011)) to read mcd data by ‘datastrm’, matlab reported it cannot find the MCStreamMEX, the folder has been under the path.
Is there any differences using the MCStreamMEX.dll to read the data between 32bit and 64bit system or the higher matlab version has not support the .dll function? If it is, how can I read the mcd data file in a 64bit system by matlab?
Thanks in advance!
axone.h- Posts : 5
Join date : 2012-02-16
Re: Read mcd data in a 64bit system by matlab
We are not distributing the MCStreamMex.dll with MC_Rack for 64bit systems.
There are two possibilities to work around this:
There are two possibilities to work around this:
- You can use the Neuroshare interface that is available on our website. For precompiled Mex-files for Neuroshare, see the Neuroshare web site.
- Or you can try to compile MCStreamMex.dll for 64bit system yourself. The sources are distributed with MC_Rack. The MCStream64.dll that is the underlying OCX component is automatically installed with MC_Rack on a 64bit system.
Another Solution to the 64-bit problem (a bit awkward, though)
Windows 64-bit will execute a 32-bit application that accesses the 32-bit McStreamMEX.dll. I wanted to run datastrm() on a 64-bit computer because I was having trouble recreating some of the datastrm fields using NeuroShare.
(1) If you have access to a matlab compiler, compile a standalone console application something like this (very simple example for purpose of illustration):
%-------------------
function [ D ] = DataStrm32( varargin )
% pass the MCD target full file path on the command line and receive the datastrm object D
D=datastrm(varargin{1});
% save D to a matfile, which in this case is a scratch file named "D32.datastrm"; this will be re-written
% every time DataStrm32.exe is executed
save('D32.datastrm','-mat','D');
end
%-------------------
Make sure the mcintfac folder and MCStreamMEX.dll files are included in the project. I have used the
paths as the MC_Rack installer defines them and have not experimented with variants.
Also, as indicated elsewhere in these forums, I modified datastrm() to return MCD parameters for the
USB-256 MEA data files, although I cannot actually read the waveform data.
(2) Put the executable somewhere in your matlab path.
(3) Then execute from Matlab:
>>system(['DataStrm32 N:\Sweeps\20120503_CM3_ctrl_Bsw.mcd']);
Other forms of system calls (e.g. using "!") work as well . This will create the mat-file "D32.datastrm"
which contains the datastrm object D.
(4) Load D into workspace. For example:
>>load('D32.datastrm','-mat')
I imagine any m-file that accesses the 32-bit MCStreamMEX.DLL can be handled the same way. Not an ideal solution, but this seems to work so far.
--Geoff
(1) If you have access to a matlab compiler, compile a standalone console application something like this (very simple example for purpose of illustration):
%-------------------
function [ D ] = DataStrm32( varargin )
% pass the MCD target full file path on the command line and receive the datastrm object D
D=datastrm(varargin{1});
% save D to a matfile, which in this case is a scratch file named "D32.datastrm"; this will be re-written
% every time DataStrm32.exe is executed
save('D32.datastrm','-mat','D');
end
%-------------------
Make sure the mcintfac folder and MCStreamMEX.dll files are included in the project. I have used the
paths as the MC_Rack installer defines them and have not experimented with variants.
Also, as indicated elsewhere in these forums, I modified datastrm() to return MCD parameters for the
USB-256 MEA data files, although I cannot actually read the waveform data.
(2) Put the executable somewhere in your matlab path.
(3) Then execute from Matlab:
>>system(['DataStrm32 N:\Sweeps\20120503_CM3_ctrl_Bsw.mcd']);
Other forms of system calls (e.g. using "!") work as well . This will create the mat-file "D32.datastrm"
which contains the datastrm object D.
(4) Load D into workspace. For example:
>>load('D32.datastrm','-mat')
I imagine any m-file that accesses the 32-bit MCStreamMEX.DLL can be handled the same way. Not an ideal solution, but this seems to work so far.
--Geoff
1flyguy- Posts : 3
Join date : 2011-11-20
Re: Read mcd data in a 64bit system by matlab
Thank you for your replay. I have tried the method and compiled a standalone console application but when I executed from Matlab:
>>system(['DataStrm32 D:\MEADISC1\20120703-wt\amy-20120703-WT-spike.mcd']);
it displayed an error "Undefined function or method 'mcstreammex' for input arguments of type 'struct'. " Moreover, I am sure that MCStreamMEX.dll file is include in the current path. The matlab version is R2011a.
Is there anything wrong?
He
>>system(['DataStrm32 D:\MEADISC1\20120703-wt\amy-20120703-WT-spike.mcd']);
it displayed an error "Undefined function or method 'mcstreammex' for input arguments of type 'struct'. " Moreover, I am sure that MCStreamMEX.dll file is include in the current path. The matlab version is R2011a.
Is there anything wrong?
He
axone.h- Posts : 5
Join date : 2012-02-16
Similar topics
» read spike data in Matlab
» How to import 64 channels data of mcd files into Matlab Matrix?
» Can I read the .mcd file using Matlab under Linux?
» How to directly import 'med' data to MATLAB
» Can Mea120 system record data with MEA in incubator
» How to import 64 channels data of mcd files into Matlab Matrix?
» Can I read the .mcd file using Matlab under Linux?
» How to directly import 'med' data to MATLAB
» Can Mea120 system record data with MEA in incubator
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum