% file_io_example.m
% File I/O Example
% adapted from http://web.cecs.pdx.edu/~gerry/MATLAB/plotting/loadingPlotData.html
% BJ Furman
% 15NOV2009

%  read data into PDXprecip matrix 
load('PDXprecip.dat');

%  copy first column of PDXprecip into month
month = PDXprecip(:,1);

%  and second column into precip
precip = PDXprecip(:,2);

%  plot precip vs. month with circles
plot(month,precip,'o',month,precip,'-r');

% add axis labels and plot title
xlabel('month of the year');
ylabel('mean precipitation (inches)');
title('Mean monthly precipitation at Portland International Airport');
