MATLAB: How to inhibit clear and clc at the beginning of an m-file

m-file_setup clear;_clc;MATLAB

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?

Best Answer

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.