Print a statement to the Command Window

N
NAVNEET NAYAN · Apr 3, 2023 · 2.2K views
Question
I am writing a program. I want to display the statement 'job done' as the output in the Command Window. How can I do it?  
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 11, 2026

To display text in the Command Window, use disp or fprintf.

disp('job done')

or

fprintf('job done \n')

 

Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!