If you want to remove the variable "ans" generated by Matlab in its command window, you can do so by suppressing output using a semicolon ";" at the end of your command. For example:
main.m11 chars2 lines
This will output:
main.m12 chars4 lines
But if you add a semicolon:
main.m11 chars2 lines
This will not output anything to the command window. Therefore, no "ans" variable will be created.
Another way to remove the "ans" variable is to clear it manually by entering the following command at the prompt:
main.m10 chars2 lines
This will remove any existing "ans" variable in the workspace.
gistlibby LogSnag