Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use MATLAB ICA 19-16 Write a function named Count Down that accepts a total time T in seconds and displays the time remaining after half
Use MATLAB
ICA 19-16 Write a function named Count Down that accepts a total time T in seconds and displays the time remaining after half of the previously displayed time has elapsed as described below. The func- tion should also accept an integer Steps as also described below. The function should immediately display the value of T, and then wait T/2 seconds before displaying T/2. It should then wait T/4 seconds and display T/4, etc. This should continue until only 1/2 top of the original time remains, at which point it waits for this remaining time, displays a zero, and emits an audio tone. It is suggested that you look up the pause function and the beep function. Example: Count Down (60,6) displays the following followed by an audio tone. 60 30 15 7.5000 3.7500 1.8750 0.9375 Displayed immediately Displayed 30 seconds later Displayed 15 seconds later Displayed 7.5 seconds later etc. etc. etc. Displayed 0.9375 seconds later accompanied by a beep Prompt the user for the total time and the number of steps You must use the while loop indicated in the sentence starting "This should continue until ..." Use display format: Time Remaining xx seconds. Hote: The beep may not work, that's ok, include the command anyway Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started