| 1 |
This provides a language binding of libbiosig to Matlab and Octave. |
| 2 |
and some speedier c-mex implementation for some matlab code. |
| 3 |
Basically, mex-files for loading biosig data are provided. |
| 4 |
- mexSLOAD.mex* loads the whole file (header and data). |
| 5 |
- mexSOPEN.mex* reads only the header information. |
| 6 |
- mexSSAVE.mex* saves data into various biosig format |
| 7 |
the list of supported formats is shown here: http://pub.ist.ac.at/~schloegl/biosig/TESTED |
| 8 |
- accovf_mex.mex* compute auto- and cross-correlation function for MOD method |
| 9 |
- sumskipnan_mex.mex* covm_mex.mex* |
| 10 |
|
| 11 |
COMPILATION: |
| 12 |
|
| 13 |
== Octave on Linux ======================= |
| 14 |
On Linux platforms the compilation is straight forward. A prerequisite is |
| 15 |
libbiosig (with its dependencies). |
| 16 |
make libbiosig && sudo make install |
| 17 |
|
| 18 |
Generate and install mexbiosig-package |
| 19 |
make mexbiosig |
| 20 |
sudo make install_mexbiosig |
| 21 |
|
| 22 |
== Octave on MacOSX ======================= |
| 23 |
You need to have homebrew (for details see http://brew.sh) |
| 24 |
|
| 25 |
# 1) Install XCode from App Store |
| 26 |
xcode-select --install |
| 27 |
|
| 28 |
# 2) install homebrew |
| 29 |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
| 30 |
|
| 31 |
# 3) Install prerequisites and recommendations for Octave |
| 32 |
brew install caskroom/cask/brew-cask |
| 33 |
brew cask install xquartz |
| 34 |
brew cask install mactex |
| 35 |
brew install curl |
| 36 |
|
| 37 |
# 4) install Octave |
| 38 |
brew tap homebrew/science |
| 39 |
export PATH="$PATH:/usr/texbin" |
| 40 |
brew install octave --with-docs |
| 41 |
|
| 42 |
and install biosig |
| 43 |
brew tap schloegl/biosig |
| 44 |
brew install mexbiosig |
| 45 |
|
| 46 |
== Octave on Window (MXE-Octave) ======================= |
| 47 |
# 1) Download and install Octave 4.0.0 |
| 48 |
https://ftp.gnu.org/gnu/octave/windows/ |
| 49 |
# 2) Get biosig sources |
| 50 |
either with git |
| 51 |
git clone git://git.code.sf.net/p/biosig/code biosig-code |
| 52 |
or source package from http://biosig.sourceforge.net/download.html |
| 53 |
libbiosig-X.Y.Z.src.tar.gz (requires version 1.7.3 or later) |
| 54 |
# 3) Start Octave and change directory to |
| 55 |
.../biosig4c++/ |
| 56 |
# 4) Make and install libbiosig |
| 57 |
system('make && make install') |
| 58 |
# 5) Generate mexbiosig pkg |
| 59 |
system('make mexbiosig') |
| 60 |
# 6) Install mexbiosig-package |
| 61 |
pkg install mex/mexbiosig-1.7.3.tar.gz |
| 62 |
|
| 63 |
|
| 64 |
== Matlab on Linux, MacOSX ======================= |
| 65 |
Prerequisites: |
| 66 |
sudo apt-get install zlib1g-dev libsuitesparse-dev |
| 67 |
Edit Makefile and set the correct path to Matlab: |
| 68 |
The mex files for Matlab are generated with |
| 69 |
MATLABDIR=/usr/local/MATLAB/R2014b make mex4m |
| 70 |
|
| 71 |
|
| 72 |
== Matlab v7.11 for Win32 ================ |
| 73 |
Compilation was successful using the mingw-cross-env on linux to generate Win32/mex files. |
| 74 |
GnuMex/Mingw must be installed together with Matlab on windows. |
| 75 |
The gnumex libraries must be copied to the linux machine having MinGW-Cross-env installed. |
| 76 |
Adapt the Makefile and run |
| 77 |
make mexw32 mexw64 |
| 78 |
|
| 79 |
|
| 80 |
Copyright (C) 2011,2015,2022 Alois Schloegl <[email protected]> |
| 81 |
This function is part of the "BioSig for C/C++" repository |
| 82 |
(BioSig4C++) at http://biosig.sf.net/ |
| 83 |
|