Home > biosig > t200 > sopen.m

sopen

PURPOSE ^

SOPEN opens signal files for reading and writing and returns

SYNOPSIS ^

function [HDR,H1,h2] = sopen(arg1,PERMISSION,CHAN,MODE,arg5,arg6)

DESCRIPTION ^

 SOPEN opens signal files for reading and writing and returns 
       the header information. Many different data formats are supported.

 Reading of data: 
     HDR = sopen(Filename, 'r', [, CHAN [, MODE]]);
     [S,HDR] = sread(HDR, NoR, StartPos);
     HDR = sclose(HDR);

 Writing of data: 
    HDR = sopen(HDR, 'w');
       writing requires a predefined HDR struct. see demo3.m 

 2nd argument (PERMISSION) is one of the following strings 
    'r'    read header
    'w'    write header
       'rz'    on-the-fly decompression of gzipped files (only supported with Octave 2.9.3 or higher). 
       'wz'    on-the-fly compression to gzipped files (only supported with Octave 2.9.3 or higher). 

 CHAN defines a list of selected Channels
       Alternative CHAN can be also a Re-Referencing Matrix ReRefMx
           (i.e. a spatial filter). 
       E.g. the following command returns the difference and 
           the mean of the first two channels. 
       HDR = sopen(Filename, 'r', [[1;-1],[.5,5]]);
       [S,HDR] = sread(HDR, Duration, Start);
       HDR = sclose(HDR);

 MODE  'UCAL'  uncalibrated data
       'OVERFLOWDETECTION:OFF' turns off automated overflow detection
       'OUTPUT:SINGLE' returned data is of class 'single' [default: 'double']
       '32bit' for NeuroScan CNT files reading 4-byte integer data
       Several opteions can be concatenated within MODE. 

 HDR contains the Headerinformation and internal data
 S     returns the signal data 

 Several files can be loaded at once with SLOAD

 see also: SLOAD, SREAD, SSEEK, STELL, SCLOSE, SWRITE, SEOF

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003