Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Geometric mean matlab

28/03/2021 Client: saad24vbs Deadline: 2 Day

· Read data from data files

· Data Analysis

· Practice with conditions and loops

· Practice with matrix and vector operations

Part A: Geometric, RMS and Harmonic Mean
Part 1 of this lab will be implementing various mathematical calculations as functions. You are not allowed to use the geomean(), rms(), harmmean(), prod() or sum() functions. In other words, solve the problem in an elementary way using for-loops.

To start, download the Lab9 folder from Bblearn and move it to your cs122 directory. Also, be sure to cd into the Lab9 folder and add it to the path.

Open up the geometric_mean.m file in your Lab9 folder. For this function, you will be implementing the geometric mean of a set of numbers, which is defined as:

image5.png
First, note that parameter being passed into the function (data). This data variable is a one dimensional vector of numbers, which correlates to the x1,x2,…,xn in the above equation. This is where you will be using a for-loop, as you will need to loop through every element in the vector and multiply it with the product of the previous elements. Be sure that your return value (the geometric mean calculated using the equation above) is stored in the variable g_mean.

Once you have completed the geometric_mean function, open the root_mean_square.m file. In this function. You will be implementing the root-mean-square (rms), which is defined as:

image2.emf

rms = 1 N

xi 2

i=1

N

rms=

1

N

x

i

2

i=1

N

å

The same concepts apply here. Data is a vector of elements, N is the number of elements in data, and the return value for the root_mean_square function should be stored in r_m_s.

When you have completed the root_mean_square function, open the harmonic_mean function. Implement the harmonic mean function, which is defined as:

image3.emf

harmonic = N1 x1

+ 1 x2

+…+ 1 xN

harmonic=

N

1

x

1

+

1

x

2

+…+

1

x

N

Once again, data is your vector of elements, N is the number of elements in data, and the return value should be stored in the variable h_mean.

Now, it is time to use all of these functions in a single script. Open the Lab9a.m file. Read the comments carefully, as they will help you implement the script. The algorithm goes like this:

1. Load the data from data file: “lab9_grades.txt”. This file can be found in your Lab9 folder. Store it in a variable named data.

2. Call your geometric_mean function. Pass it the loaded data from step 1, and store it in a variable named g_mean. To do this, paste the following code in:

a. g_mean = geometric_mean(data);

3. Call our root_mean_square function. Pass it the loaded data from step 1, and store it in a variable named r_m_s. Refer to step 2 for how to call a function.

4. Call your harmonic_mean function. Pass it the loaded data from step1, and store it in a variable named h_mean.

5. Now you are going to print your g_mean, r_m_s and h_mean values. The format should look something like ‘Geometric mean: ’ and so on.

6. Check your work using the geomean(), rms() and harmmean functions. If the values don’t match, take another look at the functions that you have implemented.

Part B: Lake Powell Water Level Data:
image4.png

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 basin states. Lake Powell is one of these reservoirs.

Open Lab9b.m. Inside the script, load the data file: “lab9_lake_powell.txt”. This file is located in your Lab9 folder, and contains data on the water level in the reservoir for the seven years from 2007 to 2013. Part of these data is shown in the table below. Columns are years, and rows are the month of Jan, Feb, March, etc.

3.6801200e+003 3.6680500e+003 3.6542500e+003 3.6176100e+003 3.5943800e+003

3.6784800e+003 3.6650200e+003 3.6510100e+003 3.6130000e+003 3.5891100e+003

3.6772300e+003 3.6633500e+003 3.6486300e+003 3.6089500e+003 3.5844900e+003

In the Lab9b.m file, implement the code to do the following:

1. Determine the overall average elevation of the water level, and print the result. The result should look like ‘Average overall rainfall: 9.89e+01‘. Note that 9.89e+01 is just used as an example; it is not the actual overall average rainfall.

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Instant Assignment Writer
Top Class Results
Assignment Hut
Math Guru
Accounting & Finance Master
Smart Accountants
Writer Writer Name Offer Chat
Instant Assignment Writer

ONLINE

Instant Assignment Writer

I am known as Unrivaled Quality, Written to Standard, providing Plagiarism-free woork, and Always on Time

$63 Chat With Writer
Top Class Results

ONLINE

Top Class Results

Give me a chance, i will do this with my best efforts

$19 Chat With Writer
Assignment Hut

ONLINE

Assignment Hut

You can award me any time as I am ready to start your project curiously. Waiting for your positive response. Thank you!

$27 Chat With Writer
Math Guru

ONLINE

Math Guru

You can award me any time as I am ready to start your project curiously. Waiting for your positive response. Thank you!

$38 Chat With Writer
Accounting & Finance Master

ONLINE

Accounting & Finance Master

You can award me any time as I am ready to start your project curiously. Waiting for your positive response. Thank you!

$40 Chat With Writer
Smart Accountants

ONLINE

Smart Accountants

I have read your project details. I can do this within your deadline.

$51 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

NUR 2 - Acc 201 final project part i accounting cycle report - 16 persic street largs north - Used soloflex for sale craigslist - Report Non Metallic Material - Light dependent reaction quiz - NRS-410V-0L191 Pathophisiology and Nursing Management of Client Health. - Verbal and Nonverbal Communication - Is diesel fuel flammable or combustible - Finding forrester viewing guide answers - I m the king of the castle quotes - ARCADIA ABORTION CLINIC +27717852514 ABORTIONS CLINIC & ABORTION PILLS FOR SALE IN PRETORIA, MAMELODI, ATTERIDGEVILLE, SUNNYSIDE, ARCADIA, - Does hillsborough community college have dorms - Feast watson wood stain colour chart - Leadership styles in remember the titans - Albion park rail maccas - Pasco electric field mapping lab - Research: United Healthcare Group (MBA 599) - Rob dobs menu bloomington il - Juegan ustedes al baloncesto en la universidad - Inventory management sap bi - Discussion Board Activity - The chief disadvantage of the shortest processing time rule is - Write a Devotional Reflection-A More Christ Life Life (Discussion 6.1) - Ansi asse z359 1 - 5/1 - How to make internship report - Nothing's changed tatamkhulu afrika - Lusus naturae margaret atwood full text - The tax cut and jobs act 2017 - Hacking into harvard case 2.1 - Experiment 1 heart valves and pumps - Ethical issues uber - Death of a salesman soliloquy - Booker t washington and web dubois dbq - You are an employee of university consultants - St luke's innovative resources bear cards - Blue care kirra haven - Atps to btps calculator - Internal project proposal template - Uncle rock by dagoberto gilb - Threshold and distinctive capabilities - 300 words not including references - Credit sales with tax journal entry - Advanced math - The giver worksheets free - Gemeinschaftsgefühl meaning in psychology - If poetry could tell it backwards - HR_STR (U3) - Biology discussion due in 18 hours - The great gatsby sample essay - Briggs and stratton twin cylinder engine manual - Ual unit 8 project proposal - Difference between primacy effect and recency effect - What does attica mean in dog day afternoon - IT incident response - Human resource management lussier 3rd edition pdf - Creative Solutions - Ancillary operational strategy support services - Dual 4 input nand gate - Ccou 301 research paper - Total sum of square formula - Theme of uncertainty in waiting for godot - New perspectives on html and css tutorial 3 case problem 1 - What's the difference between diffusion and osmosis - Cliff stabilisation advantages and disadvantages - Fish cheeks answer key pdf - Clickbank com university holiday - Green lane health centre - Slam shut off valve working principle - Ancient china geography challenge - 15:00 in 12 hour time - Strategic capabilities of starbucks - 2017 vce english exam - How to improve employee productivity in capsim - Nipp risk management framework - Electric funeral meaning - 3 syllable words ending in y - Steiner and steiner business government and society - Discussion for Management Class - Week 1 discussion. - Movers reading and writing - Twin flame sacred union - Disney swot analysis 2019 - Cranberry juice homogeneous or heterogeneous - Essential oils for horses book - How to find ph from kw - Valuing people now 2007 - Rm cobol compiler free download - Biology classification packet answer key - Rfpi joist hole chart - 0.04 is 10 times as much as - Financial accounting - Activation energy calculator using slope - SHOSHANGUVE ABORTION CLINIC +27717852514 ABORTION PILLS FOR SALE IN PRETORIA, SUNNYSIDE, BENONI, ATTERIDGEVILLE, MAMELODI, SHOSHANGUVE. ARCADIA, LAUDIUM - Two Discussions - Wk8 DQ1 Discussion Question 1 - CLO 3, CLO 4 - 6 3 binomial radical expressions page 162 - Workable ethical theories - Assessment report format for preschool