Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Before you start writing your program Download and save a copy of lake powe11.txt in the folder where you will save your assigno5.m. load in

image text in transcribed
image text in transcribed
Before you start writing your program Download and save a copy of lake powe11.txt in the folder where you will save your assigno5.m. load in the current folder for the data file. will look Problem: From MATLAB for Engineers, Se, 2018, H. Moore p 312,(c, 2012, p306) These intructions replace the instructioes in the teat The Colorado River Drainage Basin covers parts of seven western states. A series of dams has been constructed on the Colorado River and its tributaries to store runoff water and to generate low-cost hydroelectric power. The ability to regulate the flow of water has made the growth of agriculture and population in these arid desert states possible. Even during periods of extended drought, a steady, reliable source of water and electricity has been available to the basing states. Lake Powell is one of these reservoirs. lake powell.txt contains data on the water level (feet above sea level) in the reservoir for the four years 2013 to 2016. a) Use load () to read lake_powel1.txt into the lake_pove11 matrix. The matrix will have the same name as the file. Print the lake_ powe11 matrix with title and year columm headings Year headings should be printed from a yector of b) Use mean to determine the average elevation of the water level for sach ysar and the overall average for the four-year period e) Use find and length to determine how many months of each year exceeded the overall average for the four-year period. d) Determine and print the average elevation of the water for each month for the four-year period. Use mean. Create a 2-column e) Plot the water level values in lake_powe11 using the following code years. Use a loop to print one month of water levels at a time. over which the data were collected. Print the yearly average vector and the overall average with labels as shown below Print the information as shown below table of the results; print the table. See example 7.2, p.254 date-2013:1/12:2017-1/12: plot (date, lake-powell)) title('Water Level Values in Lake Powell') xlabel ('Year') ylabel ('Water level, ft MINUS FIVE POINTS for not having the CORRECT CURRENT GROUP NUMBER in your comments, Problem Constants: (with unit comments) number of months first and last year Problem Inputs: (with units) water levels New commands load ) Problem Outputs: (with units) P. 43 tprint O see instructions print what each part does as shown below Other variables: (with units) Equations: Algorithm: Include the following as comments 250-256 Print water level with 2 decimal places Print year, month with 0 decimal places Align numbers under headings as noeded Use variables for loop control, i.e use nuumber of months constant instead of 12 .cot STArr Use constant names to create % read data file % print title and year column headings, 1 print contents of lake _powe11 Followed by somments at the start of each section B through E vectors of months and years Helpful esamples prinif all types ch07 (printf inpat lip Instructions for all assignments seripts: l See Standards for Documentation of MATLAB Programs on the Canvas Resources page D Insert comments at the top and throughout each file. o Include the follow comments at the beginning of this (and ALL) files. submitter's name, GROUP # Grade of ZERO for files if submitter name not part of Canvas group Not in a group? GROU P# is-mons". For your own protection, other group members' names type "none" if submitting alone. % programfile name, ex. assign02am 4LL STUDENTS MMESMISTlurryMES ONCANIAS 8 due date of the assignment statement about collaboration REQUIRED, even if you didn't collaberate. See syllabus for examples MODIFY narrative to include surreal requirements. % a short narrative about what the file does o Use the algorithm given as comments throughout your program D Observe the instructor's rule for naming variables. Use ALL CAPS for constants variable names. Start other variables with lower case Use descriptive variable names. If you de not submit individually, there will be a S POINTS PENALTY for not joining group on Canvas Groups can be 2-4 students. DO NOT joim agroup unless you have o a Use Sample InputOutput as a guide. D Code clarity o o Indent blocks as needed. Use Smart Indent Divide your solution program code into sections as noted in the algorithm you will be removed from the groap and given the grade of ero. Use blank lines as needed to group statements. Use section comments as well as the algorithm step comments. o o Remove statements from previous assignments that do not apply to the current requirements. Use comments to show units. Use the CONSTANT and variable names; not numbers Exceptions are incrementers and numbers without identity No extra output, Le. use semicolons Output: Lake Powe11 Water Lavela (in teet) 2013 3594.38 3563.41 3596.26 3601.41 3589.11 3560.35 3591.94 3598.6:3 3584.49 3557.42 3583.22 3597.85 3583.02 3557.52 3589.94 3599.75 583.07 3607.73 3608-79 3609.47 3575.85 3404.96 3604.93 3605.56 571.073602.20 3602.08 3602.2 570.70 3602.31 3606.12 3601.27 3569.69 3602.65 3607.46 3599,7 3565.73 3600.4 3604.96 3596-79 PART : Detersine average elevation ot vater ievei tor each year and overall average Average tor Each Year tin feet 2013 3579.90 3585-70 3600.78 3602-36 Overall average: 3592.18 feet PART C: Determine how many montha of each year > overall aveage During 2013 the lake vas During 2016 the lake was above average for 12 months Average elevatlon (in feetl of the water for each sonth bove average tor 1onths PART D: Determine and print average elevation of the water tor each sontih 583.01 582.56 589.1 Submit via Convax assigao5. MATLAB script file Before you start writing your program Download and save a copy of lake powe11.txt in the folder where you will save your assigno5.m. load in the current folder for the data file. will look Problem: From MATLAB for Engineers, Se, 2018, H. Moore p 312,(c, 2012, p306) These intructions replace the instructioes in the teat The Colorado River Drainage Basin covers parts of seven western states. A series of dams has been constructed on the Colorado River and its tributaries to store runoff water and to generate low-cost hydroelectric power. The ability to regulate the flow of water has made the growth of agriculture and population in these arid desert states possible. Even during periods of extended drought, a steady, reliable source of water and electricity has been available to the basing states. Lake Powell is one of these reservoirs. lake powell.txt contains data on the water level (feet above sea level) in the reservoir for the four years 2013 to 2016. a) Use load () to read lake_powel1.txt into the lake_pove11 matrix. The matrix will have the same name as the file. Print the lake_ powe11 matrix with title and year columm headings Year headings should be printed from a yector of b) Use mean to determine the average elevation of the water level for sach ysar and the overall average for the four-year period e) Use find and length to determine how many months of each year exceeded the overall average for the four-year period. d) Determine and print the average elevation of the water for each month for the four-year period. Use mean. Create a 2-column e) Plot the water level values in lake_powe11 using the following code years. Use a loop to print one month of water levels at a time. over which the data were collected. Print the yearly average vector and the overall average with labels as shown below Print the information as shown below table of the results; print the table. See example 7.2, p.254 date-2013:1/12:2017-1/12: plot (date, lake-powell)) title('Water Level Values in Lake Powell') xlabel ('Year') ylabel ('Water level, ft MINUS FIVE POINTS for not having the CORRECT CURRENT GROUP NUMBER in your comments, Problem Constants: (with unit comments) number of months first and last year Problem Inputs: (with units) water levels New commands load ) Problem Outputs: (with units) P. 43 tprint O see instructions print what each part does as shown below Other variables: (with units) Equations: Algorithm: Include the following as comments 250-256 Print water level with 2 decimal places Print year, month with 0 decimal places Align numbers under headings as noeded Use variables for loop control, i.e use nuumber of months constant instead of 12 .cot STArr Use constant names to create % read data file % print title and year column headings, 1 print contents of lake _powe11 Followed by somments at the start of each section B through E vectors of months and years Helpful esamples prinif all types ch07 (printf inpat lip Instructions for all assignments seripts: l See Standards for Documentation of MATLAB Programs on the Canvas Resources page D Insert comments at the top and throughout each file. o Include the follow comments at the beginning of this (and ALL) files. submitter's name, GROUP # Grade of ZERO for files if submitter name not part of Canvas group Not in a group? GROU P# is-mons". For your own protection, other group members' names type "none" if submitting alone. % programfile name, ex. assign02am 4LL STUDENTS MMESMISTlurryMES ONCANIAS 8 due date of the assignment statement about collaboration REQUIRED, even if you didn't collaberate. See syllabus for examples MODIFY narrative to include surreal requirements. % a short narrative about what the file does o Use the algorithm given as comments throughout your program D Observe the instructor's rule for naming variables. Use ALL CAPS for constants variable names. Start other variables with lower case Use descriptive variable names. If you de not submit individually, there will be a S POINTS PENALTY for not joining group on Canvas Groups can be 2-4 students. DO NOT joim agroup unless you have o a Use Sample InputOutput as a guide. D Code clarity o o Indent blocks as needed. Use Smart Indent Divide your solution program code into sections as noted in the algorithm you will be removed from the groap and given the grade of ero. Use blank lines as needed to group statements. Use section comments as well as the algorithm step comments. o o Remove statements from previous assignments that do not apply to the current requirements. Use comments to show units. Use the CONSTANT and variable names; not numbers Exceptions are incrementers and numbers without identity No extra output, Le. use semicolons Output: Lake Powe11 Water Lavela (in teet) 2013 3594.38 3563.41 3596.26 3601.41 3589.11 3560.35 3591.94 3598.6:3 3584.49 3557.42 3583.22 3597.85 3583.02 3557.52 3589.94 3599.75 583.07 3607.73 3608-79 3609.47 3575.85 3404.96 3604.93 3605.56 571.073602.20 3602.08 3602.2 570.70 3602.31 3606.12 3601.27 3569.69 3602.65 3607.46 3599,7 3565.73 3600.4 3604.96 3596-79 PART : Detersine average elevation ot vater ievei tor each year and overall average Average tor Each Year tin feet 2013 3579.90 3585-70 3600.78 3602-36 Overall average: 3592.18 feet PART C: Determine how many montha of each year > overall aveage During 2013 the lake vas During 2016 the lake was above average for 12 months Average elevatlon (in feetl of the water for each sonth bove average tor 1onths PART D: Determine and print average elevation of the water tor each sontih 583.01 582.56 589.1 Submit via Convax assigao5. MATLAB script file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions