How to inhibit clear and clc at the beginning of an m-file?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Bradley Champagne
el 24 de En. de 2016
Comentada: Bradley Champagne
el 24 de En. de 2016
I am required to have the commands clear; clc; at the beginning of my homework problem programs. Normally I known that the semicolons should inhibit these commands; however, they end up clearing the screen anyway and I am unable to perform my homework. How do I properly inhibit the clear; clc; commands from preventing me from doing my homework?
0 comentarios
Respuesta aceptada
Image Analyst
el 24 de En. de 2016
Semicolons prevent/suppress expressions from echoing their value to the command window. They do not prevent the expression from being evaluated or the line of code from being executed. To do that you need to comment out the line by putting a % symbol at the beginning of the line.
Either calling, or not calling, the clc and clear commands will not prevent you from doing your homework.
Más respuestas (0)
Ver también
Categorías
Más información sobre Entering Commands en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!