MATLAB Answers

How to calculate data with price rate for water consumption.

15 views (last 30 days)
I am looking for a code for matlab analysis of my data, I want to calculate water bill for every 100 litre=1USD, for 1 month. So that the user can get total water consumption bill at the end of the month. Please help.
  7 Comments
Aman Kumar
Aman Kumar on 18 May 2020
I need the message as (The water consumption bill is, 5usd" for 1200kl or any amount value that the user consumed. Please Help

Sign in to comment.

Accepted Answer

Christopher Stapels
Christopher Stapels on 18 May 2020
This sounds like a very interesting project. I wonder what sensor you are using to track the water consumption.
It sounds like you need help with the sprintf function. This line seems to be missing a format specifier.
alertBody = sprintf("The Water consumption bill is", 5* (meter_reading/1000));
Have a look at the documentation for sprintf.

More Answers (0)

Communities

More Answers in the  ThingSpeak Community

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!