disp('read snippet of kestrel data files');
% start fresh each time
close all;
clear all;
%open the data file
fid = fopen('jan11_5040.csv');
%read first header line
InputText=textscan(fid,'%s',1,'delimiter','\n'); % Read strings delimited by a carriage return
%read next 40 lines separating data by commas
% DATA is a cell array
DATA = textscan(fid, '%s %d %f %f %f %f %f %f %f %f %f %f',40,'delimiter',',');
% create an array for all 10 kestrels
X = zeros(40,10);
% create a vector for times
time = zeros(40,1);
% store the array of times subtracting the initial value and turning into 
% decimal minutes
time = double(DATA{1,2}(:)-DATA{1,2}(1))/60.;
%open figure
figure(1)
% overlay graphics
hold on;
for i=1:10
    % fill the X array with the data
    X(:,i)=DATA{1,i+2}(:);
    plot(time,X(:,i));
end
fclose(fid);