0001 function [Epoch,NEpoch,Max_microv,Min_Chan,Nbad_chan,bad_chan,mask] = read_mask(rawfname);
0002
0003
0004
0005
0006
0007
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