At T o'clock, after a hard day of Matlab, I immediately start drinking and treat myself to N pints of tasty beer. Each beer I drink has 3 standard units (strong beer - ~5.2%) and my body processes 1 unit of alcohol each hour (the average). Assume all beer is consumed instantly.
In England the legal limit for driving is approximately 2 units of alcohol in your blood, assuming this at what time can I legally drive again?
The input N is number of beers drank and T the time I start drinking (as a 24 hour integer). The output H is the hour I may drive again (24 hour integer) and the output Y is how many days (where 0 is the same day, 1 is the following day etc).
E.g. If I drink 1 beer (N=1) at 7 pm (T=19), 1 of the units will be processed in 1 hour and I can 'safely' drive with 2 units in my blood. The output is D=0, H=20.
https://www.nhs.uk/common-health-questions/lifestyle/how-long-does-alcohol-stay-in-your-blood/
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
Find the sum of all the numbers of the input vector
54901 Solvers
-
Remove the polynomials that have positive real elements of their roots.
1743 Solvers
-
Arrange vector in ascending order
822 Solvers
-
Matrix with different incremental runs
592 Solvers
-
Create a vector whose elements depend on the previous element
801 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!