Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
image text in transcribed
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

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

Step: 3

blur-text-image

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

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions

Question

5. Structure your speech to make it easy to listen to

Answered: 1 week ago

Question

1. Describe the goals of informative speaking

Answered: 1 week ago