Print a statement to the Command Window
12,570 views (last 30 days)
Show older comments
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?
2 Comments
GOPINATHAN PRAKASH
on 20 Jun 2021
Hai navneet nayan,
disp('job done');
disp command is used display the string values.
Accepted Answer
More Answers (4)
Gaurav Srivastava
on 26 May 2019
It's not happening. How to display LHS=RHS?.png)
.png)
3 Comments
sidway
on 13 Aug 2021
Try to make a diference between a and b with a tolerance
tol = 1e-3
if abs(a - b) < tol
disp('LHS=RHS')
end
Dhritishman
on 10 Jul 2022
Use the disp function to print to the command window:
disp('job done')
1 Comment
John Taranto
on 20 Dec 2022
Please help me understand this. I use Live Scripts to write my Matlab code. There is a window titled Live Editor - with the path to the mlx file. Separately, there is a Command Window. When I use either the disp() or fprintf() function the output is to the Live Editor Window. I would like to output to the Command Window. How would I do that?
Thanks.
See Also
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!