function c = xload (filename)
%XLOAD  Load data file with various # of entries
%
%   d = XLOAD(filename);
%   d is a cell vector; each cell is a line of data.

% Ling Li, Caltech
% $Id: xload.m 2972 2007-03-30 20:28:10Z ling $

f = fopen(filename);

c = cell(0);
while 1,
    line = fgetl(f);
    if ~ischar(line), break, end

    eval(['c{end+1} = [' line '];']);
end
fclose(f);
