Home > eeg > egis > net_utils > read_mask.m

read_mask

PURPOSE ^

SYNOPSIS ^

function [Epoch,NEpoch,Max_microv,Min_Chan,Nbad_chan,bad_chan,mask] = read_mask(rawfname);

DESCRIPTION ^

[Epoch,NEpoch,Max_microv,Min_Chan,Nbad_chan,bad_chan,mask] = read_mask(rawfname);

reads in editcode information fom '*.mask' file

 rawfname must be a NSFragger filename.  [rawfname '.mask'] must be the mask file, stored in the same directory as the datafile.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [Epoch,NEpoch,Max_microv,Min_Chan,Nbad_chan,bad_chan,mask] = read_mask(rawfname);
0002 %
0003 %[Epoch,NEpoch,Max_microv,Min_Chan,Nbad_chan,bad_chan,mask] = read_mask(rawfname);
0004 %
0005 %reads in editcode information fom '*.mask' file
0006 %
0007 % rawfname must be a NSFragger filename.  [rawfname '.mask'] must be the mask file, stored in the same directory as the datafile.
0008 %
0009 maskfname = [rawfname '.mask'];
0010 infid = fopen(maskfname,'rb');
0011 if infid < 0
0012     error('invalid edit code file name')
0013 end;
0014 Epoch = fread(infid,1,'integer*2');
0015 NEpoch = fread(infid,1,'integer*2');
0016 NChan = fread(infid,1,'integer*2');
0017 Max_microv = fread(infid,1,'integer*2');
0018 Min_Chan = fread(infid,1,'integer*2');
0019 Nbad_chan = fread(infid,1,'integer*2');
0020 bad_chan = fread(infid,[1,Nbad_chan],'integer*2');
0021 mask = fread(infid,[NEpoch,NChan+1],'integer*2');
0022

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003