Downloading

The latest stable version of the source code for MATLAB/Octave is available in compressed format. The toolbox was tested using versions 2014b and superior of Matlab, if you have trouble with your version please contact us.

If you have git installed and would rather have the latest stable FECGSYN, you may consider cloning branch master from GitHub:

git clone https://github.com/fernandoandreotti/fecgsyn.git

Installing

Install on Matlab

Simply extract the compressed package (above) to a local folder and include that folder to Matlab/Octave's path.

Alternatively, Matlab users can download and install the toolbox using straight from Matlab by accessing the desired installation path with cd dirname and using the following lines of code:

[old_path]=which('FECGSYN_UI');if(~isempty(old_path)) rmpath(old_path(1:end-12)); end
fecgsyn_url='https://github.com/fernandoandreotti/fecgsyn/archive/master.zip';
urlwrite(fecgsyn_url,'fecgsyn_toolbox.zip');
unzip('fecgsyn_toolbox.zip');
cd fecgsyn-master
addpath(genpath(pwd))
savepath
After installing FECGSYN you may verify your installation by loading the following dummy set test.mat:
slashchar = char('/'*isunix + '\'*(~isunix));
load([pwd slashchar 'data' slashchar 'FECGSYN_test.mat'])
FECGSYN_plotmix(out)
Further examples are available here.

WFDB

If you are working with WFDB format, the WFDB Toolbox for Matlab/Octave ( available here) should be installed.

As mentioned on WFDB's Toolbox website, to install or update a previous installation of this toolbox:

  1. Open MATLAB or Octave
  2. Go into the directory where you wish to install the toolbox with cd dirname
  3. Type (or copy and paste) the following commands into the MATLAB or Octave window:

     [old_path]=which('rdsamp');if(~isempty(old_path)) rmpath(old_path(1:end-8)); end
     wfdb_url='http://physionet.org/physiotools/matlab/wfdb-app-matlab/wfdb-app-toolbox-0-9-9.zip';
     [filestr,status] = urlwrite(wfdb_url,'wfdb-app-toolbox-0-9-9.zip'); %Octave users may have to download manually unzip('wfdb-app-toolbox-0-9-9.zip');
     cd wfdb-app-toolbox-0-9-9;cd mcode
     addpath(pwd);savepath

Anatomic models

If you are using FECGSYN's asymmetric volume conductor modeling capability, a set of pre-processed anatomic models can be installed. Please read the license conditions for these models ( available here) before following the instructions below:

  1. Open MATLAB
  2. Go to the directory where you have installed the FECGSYN toolbox with cd dirname
  3. Type (or copy and paste) the following commands into the MATLAB window:

     cd data; anatomic_models_url='https://github.com/emersonkeenan/fecgsyn-anatomic-models/archive/master.zip';
     websave('anatomic_models.zip',anatomic_models_url); unzip('anatomic_models.zip','anatomic_models'); 
     delete 'anatomic_models.zip'; cd anatomic_models; movefile fecgsyn-anatomic-models-master femonum;