Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Read all instructions before beginning your work. COMP1200- MATLAB-assign06 Due 1:59 pm Friday- March 8, 2019 NOTE: Your submitted file(s) MUST be spelled and cased

image text in transcribedimage text in transcribed

Read all instructions before beginning your work. COMP1200- MATLAB-assign06 Due 1:59 pm Friday- March 8, 2019 NOTE: Your submitted file(s) MUST be spelled and cased as instructed. Submit assign06a.m, assign0 6a.m ,assign06a.m via Canvas Before you start writing your program Download and save a copy of ake-powell . txt in the folder where you will save your assign 06 will look in the current folder for the data file programs. The functions Problem From MATLAB for Engineers, Se, 2018, H. Moore, p.312, (4e, 2012, p306). These instructions replace the instructions in the text 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. lakepowell.txt contains data on the water level (feet above sea level) in the reservoir for the four years 2013 to 2016. Submit before assign06 BEFORE vou leave for SPRING BREAK Instructions for all assignments scripts See Standards for Documentation of MATLAB Programs on the Canvas Resources page 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? GROUP# is "none". For your own protection, % other group members' names type "none" if submitting alone program file name, ex. assign02a.m % due date of the assignment % statement about collaboration % a short narrative about what the file does MODIFY narrative to include current requirements. REQUIRED, even if you didn't collaborate. See syllabus for examples. o Use the algorithm given as comments throughout your program Observe the instructor's rule for naming variables o Use ALL CAPS for constants variable names o Start other variables with lower case o Use descriptive variable names Use Sample input/output as a guide If you do not submit individually there will be a 5 POINTS PENALTY for not joining a group on Canvas. Groups can be 2-4 students. DO NOT join a group unless you have worked with the other members. If you do, you will be removed from the group and given the grade of zero. Code clarity: Indent blocks as needed. Use Smart Indent Divide your solution program code into sections as noted in the algorithm. Use blank lines as needed to group statements. Use section comments as well as the algorithm step comments Remove statements from previous assignments that do not apply to the current requirements. o o o o MINUS FIVE POINTS for not having the CORRECT CURRENT GROUP NUMBER in your comments. Program: assign06a.m Revise your assign05.m by adding the exist function to print a message only if the data file is not available. The output should be the same as with assign05.m New commands exist( Program: assign06b.m REMOVE UNNECESSARY STATEMENTS FROM PREVIOUS PROGRAMS INCLUDE APPROPRIATE COMMENTS Check the file ID to determine if the file is available New commands fopen () fscanf () nested for loops Only print message if file is not available Use nested for loops to read one water level value at a time into the lake_powell matrix lake-powell (month, year) -fscanf(fileID, '%f', 1);, Use mean to determine the average elevation of the water level for each year and the Continue to use fprintf ) Print water level with 2 decimal places Print year, month with 0 decimal places Align numbers under headings Use constant names overall average for the four-year period over which the data were collected. Print the yearly average vector and the overall average with labels as shown below Additional Problem Constants (with unit comments) data file name Output Average for Each Year (in feet) 2013 2014 2015 2016 3579.90 3585.70 3600.78 3602. 36 Overall average: 3592.18 feet Program: assign06c.m REMOVE UNNECESSARY STATEMENTS FROM PREVIOUS PROGRAMS INCLUDE APPROPRIATE COMMENTS Use existto determine if the file is available. Only print message if file is not New commands textread () save selected columns of a file available Use textread() to save the first and last years into a two column matrix Continue to use fprintf ) Print water level with 2 decimal places Print year, month with 0 decimal places Align numbers under headings Do not save the other years. Do not use a loop Print the lake_powell matrix with title and year column headings Do not use a loop to print matrix. Use mean to determine and print the average elevation of the water for each month for the four-year period. Create a 2-column table of the results; print the table. See example 7.2, p.254 Problem Constants: (with unit comments) as given in previously 05 and 06 Use constant names Output Read all instructions before beginning your work. COMP1200- MATLAB-assign06 Due 1:59 pm Friday- March 8, 2019 NOTE: Your submitted file(s) MUST be spelled and cased as instructed. Submit assign06a.m, assign0 6a.m ,assign06a.m via Canvas Before you start writing your program Download and save a copy of ake-powell . txt in the folder where you will save your assign 06 will look in the current folder for the data file programs. The functions Problem From MATLAB for Engineers, Se, 2018, H. Moore, p.312, (4e, 2012, p306). These instructions replace the instructions in the text 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. lakepowell.txt contains data on the water level (feet above sea level) in the reservoir for the four years 2013 to 2016. Submit before assign06 BEFORE vou leave for SPRING BREAK Instructions for all assignments scripts See Standards for Documentation of MATLAB Programs on the Canvas Resources page 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? GROUP# is "none". For your own protection, % other group members' names type "none" if submitting alone program file name, ex. assign02a.m % due date of the assignment % statement about collaboration % a short narrative about what the file does MODIFY narrative to include current requirements. REQUIRED, even if you didn't collaborate. See syllabus for examples. o Use the algorithm given as comments throughout your program Observe the instructor's rule for naming variables o Use ALL CAPS for constants variable names o Start other variables with lower case o Use descriptive variable names Use Sample input/output as a guide If you do not submit individually there will be a 5 POINTS PENALTY for not joining a group on Canvas. Groups can be 2-4 students. DO NOT join a group unless you have worked with the other members. If you do, you will be removed from the group and given the grade of zero. Code clarity: Indent blocks as needed. Use Smart Indent Divide your solution program code into sections as noted in the algorithm. Use blank lines as needed to group statements. Use section comments as well as the algorithm step comments Remove statements from previous assignments that do not apply to the current requirements. o o o o MINUS FIVE POINTS for not having the CORRECT CURRENT GROUP NUMBER in your comments. Program: assign06a.m Revise your assign05.m by adding the exist function to print a message only if the data file is not available. The output should be the same as with assign05.m New commands exist( Program: assign06b.m REMOVE UNNECESSARY STATEMENTS FROM PREVIOUS PROGRAMS INCLUDE APPROPRIATE COMMENTS Check the file ID to determine if the file is available New commands fopen () fscanf () nested for loops Only print message if file is not available Use nested for loops to read one water level value at a time into the lake_powell matrix lake-powell (month, year) -fscanf(fileID, '%f', 1);, Use mean to determine the average elevation of the water level for each year and the Continue to use fprintf ) Print water level with 2 decimal places Print year, month with 0 decimal places Align numbers under headings Use constant names overall average for the four-year period over which the data were collected. Print the yearly average vector and the overall average with labels as shown below Additional Problem Constants (with unit comments) data file name Output Average for Each Year (in feet) 2013 2014 2015 2016 3579.90 3585.70 3600.78 3602. 36 Overall average: 3592.18 feet Program: assign06c.m REMOVE UNNECESSARY STATEMENTS FROM PREVIOUS PROGRAMS INCLUDE APPROPRIATE COMMENTS Use existto determine if the file is available. Only print message if file is not New commands textread () save selected columns of a file available Use textread() to save the first and last years into a two column matrix Continue to use fprintf ) Print water level with 2 decimal places Print year, month with 0 decimal places Align numbers under headings Do not save the other years. Do not use a loop Print the lake_powell matrix with title and year column headings Do not use a loop to print matrix. Use mean to determine and print the average elevation of the water for each month for the four-year period. Create a 2-column table of the results; print the table. See example 7.2, p.254 Problem Constants: (with unit comments) as given in previously 05 and 06 Use constant names Output

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

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

=+How many nouns are in the American Pledge of Allegiance?

Answered: 1 week ago

Question

eclipse - work space lab 2 my grade write java

Answered: 1 week ago

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago