Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here are the two columns of data that are in the excel file mentioned. The file needs to be called 'A7_DataIn.xlsx' to work. This is

Here are the two columns of data that are in the excel file mentioned. The file needs to be called 'A7_DataIn.xlsx' to work. This is a matlab program.

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribedimage text in transcribed

A B D E 50 1 1 2 N 3 4 5 6 6 7 8 9 0.85 593 890 224 1075 903 711 360 654 673 1120 989 1090 824 566 75 0.8 594 891 225 1074 906 714 359 656 672 1121 993 1094 828 568 1064 10 11 12 13 14 15 16 17 1064 D E 18 19 20 21 22 23 24 A 637 405 559 849 711 897 1121 1090 689 1091 296 236 473 731 685 1032 B 640 409 562 849 712 901 1121 1090 690 1095 300 235 474 25 26 27 28 29 30 31 32 33 34 731 689 1035 14 Reads operational and flow rate data from an Excel workbook and calculates the daily power produced by two Hydroelectric power stations given the daily flow rate for each station 5 6 7 - clear 8 clc 9 10 11 12 7* Read the data from an Excel file 'A7_HW_DataIn.xlsx' into array dataIn. * Verify the number of rows and columns in dataIn and print their values to the screen using the fprintf function 13 14 - 15 dataIn = readmatrix("A7_DataIn.xlsx'); 16 17 18 19 20 21 ## Create a row array hHead that contains the hydrostatic head (m) for each station and a row array nu that contains station efficiencies by extracting appropriate rows from array dataIn. Create a 3rd array qFlow with (n-2) rows (n-number of rows in dataIn) and 2 columns that contains the average daily flow rate data in m^3/s for each station for 31 days. (Use comments to indicate the units of the quantities you are defining.) 22 23 24 25 26 27 28 84 Use fprintf to print the values of the hydrostatic head and the efficiency for each station. 29 30 31 32 33 34 35 ## Calculate the electrical power produced by each station The electrical power in Watts [W] is given by $pwr = g*dens*nu*qFlow*hHead [W] & dens the density of water = 1000 kg/m^3 $g - gravity acceleration = 9.8 m/s^2 nu - overall plant efficiency $qFlow - volumetric flow rate & hHead hydrostatic head (m) 36 37 38 39 40 41 42 43 44 45 7% Convert power from Watts to MegaWatts. Find the maximum, mininum and average power in MegaWatts produced by each station. Output these values for each station separately to the screen using the fprintf function with one digit after the decimal point 46 47 48 49 50 51 Create a new array dataout that has 4 columns : $ Column 1 - the flow rate for station 1, Column 2 - the daily power calculated for station 1, $ Column 3 - the flow rate for station 2 Column 4 - the daily power for station 2 52 53 54 56 18 Round the values in the new array to the nearest integer 57 58 59 #8 Write the new array to an Excel workbook usinge writematrix function 60 61 62 - 63 writematrix (dataOut, 'A7_DataOut.xlsx') 64 A B D E 50 1 1 2 N 3 4 5 6 6 7 8 9 0.85 593 890 224 1075 903 711 360 654 673 1120 989 1090 824 566 75 0.8 594 891 225 1074 906 714 359 656 672 1121 993 1094 828 568 1064 10 11 12 13 14 15 16 17 1064 D E 18 19 20 21 22 23 24 A 637 405 559 849 711 897 1121 1090 689 1091 296 236 473 731 685 1032 B 640 409 562 849 712 901 1121 1090 690 1095 300 235 474 25 26 27 28 29 30 31 32 33 34 731 689 1035 14 Reads operational and flow rate data from an Excel workbook and calculates the daily power produced by two Hydroelectric power stations given the daily flow rate for each station 5 6 7 - clear 8 clc 9 10 11 12 7* Read the data from an Excel file 'A7_HW_DataIn.xlsx' into array dataIn. * Verify the number of rows and columns in dataIn and print their values to the screen using the fprintf function 13 14 - 15 dataIn = readmatrix("A7_DataIn.xlsx'); 16 17 18 19 20 21 ## Create a row array hHead that contains the hydrostatic head (m) for each station and a row array nu that contains station efficiencies by extracting appropriate rows from array dataIn. Create a 3rd array qFlow with (n-2) rows (n-number of rows in dataIn) and 2 columns that contains the average daily flow rate data in m^3/s for each station for 31 days. (Use comments to indicate the units of the quantities you are defining.) 22 23 24 25 26 27 28 84 Use fprintf to print the values of the hydrostatic head and the efficiency for each station. 29 30 31 32 33 34 35 ## Calculate the electrical power produced by each station The electrical power in Watts [W] is given by $pwr = g*dens*nu*qFlow*hHead [W] & dens the density of water = 1000 kg/m^3 $g - gravity acceleration = 9.8 m/s^2 nu - overall plant efficiency $qFlow - volumetric flow rate & hHead hydrostatic head (m) 36 37 38 39 40 41 42 43 44 45 7% Convert power from Watts to MegaWatts. Find the maximum, mininum and average power in MegaWatts produced by each station. Output these values for each station separately to the screen using the fprintf function with one digit after the decimal point 46 47 48 49 50 51 Create a new array dataout that has 4 columns : $ Column 1 - the flow rate for station 1, Column 2 - the daily power calculated for station 1, $ Column 3 - the flow rate for station 2 Column 4 - the daily power for station 2 52 53 54 56 18 Round the values in the new array to the nearest integer 57 58 59 #8 Write the new array to an Excel workbook usinge writematrix function 60 61 62 - 63 writematrix (dataOut, 'A7_DataOut.xlsx') 64

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

Using QuickBooks Online For Accounting 2021

Authors: Glenn Owen

4th Edition

0357442164, 9780357442166

More Books

Students also viewed these Accounting questions

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago