STATUS: work in progress io input-output for (EEG)-data.
More...
#include "definitions.h"
#include "eeg.h"
#include "optarg.h"
#include "io_matlab.h"
#include "io_wav.h"
Go to the source code of this file.
Defines |
#define | MAX_LINE_LENGTH 500 |
Functions |
ChannelInfo * | read_chaninfo_ced (const char *fname, ChannelInfo *chans) |
double * | read_dblp_ascii (const char *fname, int N, double *v) |
double ** | read_double_matrix_ascii (const char *fname, int xdim, int ydim, double **d) |
Array * | read_matrix_from_text (const char *fname) |
| Read a matrix from blank-separated file.
|
void | write_dblp_ascii (FILE *out, const double *v, int n) |
void | write_dblp_ascii_file (const char *fname, const double *v, int n) |
void | write_dblpp_ascii (FILE *out, const double **d, int xdim, int ydim, OptArgList *opts) |
void | write_dblpp_ascii_file (const char *fname, const double **d, int xdim, int ydim, OptArgList *opts) |
void | write_intp_ascii (FILE *out, const int *v, int n) |
void | write_intp_ascii_file (const char *fname, const int *v, int n) |
Detailed Description
STATUS: work in progress io input-output for (EEG)-data.
These functions are for some generic data types.
For specialized IO-functions, see
- io_matlab.h -- Input/Output for MATLAB (requires MatIO)
- io_wav.h -- Input/Output for WAV-Audio Files
Definition in file io.h.
Define Documentation
#define MAX_LINE_LENGTH 500 |
Definition at line 35 of file io.h.
Function Documentation
reads ChannelInfo struct from .ced file (EEGlab). Format is: One line with labels (tab-sep), followed by lines of values (tab-sep). This function reads:
- labels: "labels" "X", "Y", "Z"
- values: char* double double double
- Parameters:
-
| fname | filename |
| chans | ChannelInfo struct (large enough) or NULL (memory allocated in function) |
- Returns:
- chaninfo read from file or NULL if error occured
Definition at line 122 of file io.c.
double* read_dblp_ascii |
( |
const char * |
fname, |
|
|
int |
N, |
|
|
double * |
v | |
|
) |
| | |
read 1D vector frome file
Definition at line 232 of file io.c.
double** read_double_matrix_ascii |
( |
const char * |
fname, |
|
|
int |
xdim, |
|
|
int |
ydim, |
|
|
double ** |
d | |
|
) |
| | |
Array* read_matrix_from_text |
( |
const char * |
fname |
) |
|
Read a matrix from blank-separated file.
The format is something like this:
-0.005344 0.696318 0.005792 589.041211
-0.005348 0.691603 0.007035 589.074254
-0.005352 0.686796 0.008324 589.096248
-0.005516 0.680181 0.010164 589.118214
...
- Parameters:
-
| fname | the name of the file |
- Returns:
- the matrix
Definition at line 68 of file io.c.
void write_dblp_ascii |
( |
FILE * |
out, |
|
|
const double * |
v, |
|
|
int |
n | |
|
) |
| | |
Definition at line 298 of file io.c.
void write_dblp_ascii_file |
( |
const char * |
fname, |
|
|
const double * |
v, |
|
|
int |
n | |
|
) |
| | |
Definition at line 308 of file io.c.
void write_dblpp_ascii |
( |
FILE * |
out, |
|
|
const double ** |
d, |
|
|
int |
xdim, |
|
|
int |
ydim, |
|
|
OptArgList * |
opts | |
|
) |
| | |
write double matrix to file in ASCII format.
- Parameters:
-
| opts | may contain
- "precision=int" number of significant digits (after comma); default=6;
|
Definition at line 274 of file io.c.
void write_dblpp_ascii_file |
( |
const char * |
fname, |
|
|
const double ** |
d, |
|
|
int |
xdim, |
|
|
int |
ydim, |
|
|
OptArgList * |
opts | |
|
) |
| | |
write double matrix to file in ASCII format.
- Parameters:
-
| opts | may contain
- "precision=int" number of significant digits (after comma); default=6;
|
Definition at line 258 of file io.c.
void write_intp_ascii |
( |
FILE * |
out, |
|
|
const int * |
v, |
|
|
int |
n | |
|
) |
| | |
Definition at line 320 of file io.c.
void write_intp_ascii_file |
( |
const char * |
fname, |
|
|
const int * |
v, |
|
|
int |
n | |
|
) |
| | |
Definition at line 330 of file io.c.