Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In class P1: Modify following MATLAB program so that it will give answer to In-Class problem 5. Current MATLAB program is designed to provide answer

image text in transcribed

image text in transcribed

In class

image text in transcribed

P1: Modify following MATLAB program so that it will give answer to In-Class problem 5. Current MATLAB program is designed to provide answer for Example 1.9. Note: Customer ID can be any 15 digit string MATLAB Function: electbill- - EunctioncustID, total cost, avg costelect bill( custID mo kwh) %elect-bill Summary of this function goes here detailed explanation goes here base charges 12: first 1000.16; next 2000.10 remaining_kwh 0.06; if (mo kwh > 300) otal cost-base charges ELest 100*100ext 200 200+emaining kwh(mo kwh-300) elseif (mo kwh > 100) total cost bas-charges first-100-100 nut-200.,no ka-100); a + + else otal cost-base charges Lst 100o kh end avg cost-total_cost/mo kwhi end Place the elect bill.m file in C:DocumentsMATLAB folder Write following in MATLAB command window: [cID, cost, avgcost) Press Enter You should see following in command window electbill 120120120120120,700)

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

More Books

Students also viewed these Databases questions

Question

8. Explain how to price managerial and professional jobs.

Answered: 1 week ago