function [t, mean, se] = readData(fileName)
% Read experimental data stored in the dat files in a specific format. The
% dat files are in the same folder as this file.

f = fopen(fileName);

% throw out the first three lines of documentation and pick 4th line
fscanf(f, '%*s\n%*s\n%*s\n%s\n', 1);

% figure; hold on
t = cell(1, 10);
mean = cell(1, 10);
se = cell(1, 10);
i = 1;
while ~feof(f)
    fscanf(f, '%s', 1);
    t{i} = fscanf(f, '%g, ');
    mean{i} = fscanf(f, '%g, ');
    se{i} = fscanf(f, '%g, ');
    
    i = i+1;
%     h = errorbar(t, mean, se);
%     set(h, 'DisplayName', strrep(cond, '_', '+'));
end
t(i-1:end) = [];
mean(i-1:end) = [];
se(i-1:end) = [];

fclose(f);
