function [t,g] = aukmat(base, chnam, use0);

% AUKMAT   read data from an AUKE/PC data file
%
% Usage  : aukdat = aukmat (base, chnam, use0)
%
% aukdat : output data read from AUKE/PC files
% base   : base of the AUKE/PC .dat and .seq file names
% chnam  : channel name from which data is to be read
% use0   : 0 if no zerolevel correction is wanted to the data
%          1 if a  zerolevel correction is wanted to the data
%

lbase  = length (base);
lchnam = length (chnam);

if (exist([base,'.dat']) ~= 2 | exist([base,'.seq']) ~= 2) 
   disp('ERROR: AUKE/pc file not found');
   t = [];
   g = [];
else
 
save aukmat.asc lbase base lchnam chnam use0 -ascii;


!auk.exe

delete aukmat.asc

load aukma1;
t = aukdat;
load aukma2;
g = aukdat;

delete aukma1.mat
delete aukma2.mat
end






%
