View the step-by-step solution to:

Question

Screen Shot 2019-10-01 at 10.44.00 AM.png

Help please,I'm stuck

in this matlab question,can you please help?

Ps: I need in matlab code please

Screen Shot 2019-10-01 at 10.44.00 AM.png

The electricity accounts of residents in a very small rural community are calculated as follows:
If 500 or fewer units are used, the cost is 2 cents per unit.
" If more than 500, but not more than 1000, units are used, the cost is $10 for the first
500 units and 5 cents for every unit in excess of 500.
If more than 1000 units are used, the cost is $35 for the first 1000 units plus
10 cents for every unit in excess of 1000.
A basic service fee of $5 is charged no matter how much electricity is used.
Five residents use the following amounts (units) of electricity in a certain month: 200, 500, 700,
1000, and 1500.Write a program that uses logical vectors to calculate how much they must pay.
Display the results in two columns: one for the electricity used in each case and one for the amount
they should pay. Script name should be called electricityl.m

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes