Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For example, the commandshould return the following values: Step 1 = 1 1 4 4 Step 2 = 1 0 3 5 Step 3 =

For example, the commandshould return the following values:
Step1=1144
Step2=1035
Step3=0
Totalcost=2179
You need to use if/else statements to differentiate the usage blocks. You may assume water usage is always an integer value.
Note: Do not include any clc or clear all commands in your MATLAB Grader code. Code to call your function ?The water usage charges from a water supplier is as shown:
Write a function, with the following first line, that calculates the total cost of a user's water usage.
function [Step1, Step2, Step3, Total_cost]= water_bill(Water_usage)
input: water usage amount in kL
outputs: Step1- breakdown cost of the first 440kL
Step2- breakdown cost of the next 440kL
Step3- breakdown cost of usage above 880kL
Total_cost - cost of total water usage
For example, the commandshould return the following values:
Step1=1144
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

Students also viewed these Databases questions

Question

Outline some key aspects and contemporary issues in IHRM

Answered: 1 week ago