STATUS: work in progress io_matlab MATLAB-input-output for (EEG)-data. More...
#include "array.h"
#include "eeg.h"
Go to the source code of this file.
Functions | |
Array * | read_array_matlab (const char *file, const char *varname) |
read a MATLAB-array from a .mat file. | |
EEG * | read_eeglab_file (const char *file) |
read EEG struct from EEGlab (MATLAB) .set-file. | |
int | write_array_matlab (const Array *a, const char *varname, const char *file, bool append) |
save Array-struct as MATLAB .mat file. | |
int | write_eeglab_file (EEG *eeg, const char *file) |
write EEG-struct to EEGlab-compatible MATLAB file. |
STATUS: work in progress io_matlab MATLAB-input-output for (EEG)-data.
eeglab/matlab file reader functions if matio library is installed
Definition in file io_matlab.h.
Array* read_array_matlab | ( | const char * | file, | |
const char * | varname | |||
) |
read a MATLAB-array from a .mat file.
file | the .mat file | |
varname | the name of the variable in the .mat file; can be NULL, in this case the first variable is read. |
Definition at line 204 of file io_matlab.c.
EEG* read_eeglab_file | ( | const char * | file | ) |
read EEG struct from EEGlab (MATLAB) .set-file.
This reader uses MatIO to parse EEGlab files and construct a LibEEGTools EEG struct. It was developed with EEGlab version 6.01b.
Currently, the EEGlab set must be "epoched", that means that the data must be three-dimensional with channels x n x trials. Continuous data is not yet supported and the reader will fail.
The reader currently works only if the storage is in single .set file (as opposed to a pair of .set and .dat file).
file | eeglab .set file |
Definition at line 45 of file io_matlab.c.
int write_array_matlab | ( | const Array * | a, | |
const char * | varname, | |||
const char * | file, | |||
bool | append | |||
) |
save Array-struct as MATLAB .mat file.
Currently, the function converts all arrays to double-arrays. Should be easy to implement for arbitrary types if needed.
a | the Array | |
varname | MATLAB-name of the array | |
file | the filename | |
append | if TRUE, the function tries to open() the file, else it is overwritten |
Definition at line 330 of file io_matlab.c.
int write_eeglab_file | ( | EEG * | eeg, | |
const char * | file | |||
) |
write EEG-struct to EEGlab-compatible MATLAB file.
This write uses MatIO to create an EEGlab file. It was developed with EEGlab version 6.01b.
eeg | the struct | |
file | eeglab .set file |
Definition at line 303 of file io_matlab.c.