fid=fopen('monthexpenses.txt','rt');
% Get the first three header lines
sent1=fgetl(fid);
sent2=fgetl(fid);
sent3=fgetl(fid);
%Alternate way of getting the first three header %lines
% for i = 1:3
%   fgetl(fid);
% end
numdata=fscanf(fid,'%i'); %Read in numerical data.
avg_exp=mean(numdata); %Find the average value.
high_exp=max(numdata); %Find the maximum value.
sum_exp=sum(numdata);    %Find the sum of the data.  
fclose(fid);