readPrecipFile - % Original Code: October 16, 2008 % Last...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function precip_cm = readPrecipFile(fileName) % READPRECIPFILE reads the daily values off precipitation (in inches) from % the precipitation data file (151PRECP.DAT), converts them into an array % off daily precipitation values in centimeters and returns the array to % the invoking statement. % % BEE 1510: Introduction to Computer Programming % Laboratory Exercise Number 07 % Timothy Lin % TA: Celina % % Record of Revisions:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % Original Code: October 16, 2008 % Last Revision: % % Variable Dictionary % % Parameters in_cm = 2.54 i % Read daily values of precipitation from precipitation data file (inches) precip_in = textread(fileName); p % Start with an empty array precip_cm = ; p % Convert precipitation values from in to cm precip_cm = precip_in*in_cm precip_cm = [precip_cm] p end...
View Full Document

Ask a homework question - tutors are online