function dat = oasisload(directory)
% OASISLOAD Load all oasis style text iels in a directory into a single
% data structure
%
% Use as: dat = oasisload(directory)
% Inputs: directory = The path fo the directory you want to load
% Ouputs: dat = All the data in the fiels in direcory loaded into an array.
% Note the load will have quirks if each file has a different number of
% columns.

% Brian Schlining - 18 Sep 2003

fileList = getfname(directory)

for i = 3:size(fileList, 1)
    filename = fullfile(directory, deblank(fileList(i,:)));
    fprintf(1, 'Loading %s\n', filename);
    d = readoasis(filename);
    if i == 3
        dat = d;
    else
        dat = [dat; d];
    end
    
end

