Answer:
function command_line()
while 1==1
x = input('>','s');
if x == 'q'
user_message = sprintf('Shutting down the program now... ');
disp(user_message)
Step-by-step explanation:
- Create a function called command_line and run a while loop loop inside it.
- Take input from user and keep on displaying it.
- Check whether the user entered the letter q, then display the "Shutting down the program now..." message and then terminate program.