Functions… the basic necessity of software….


As functions are building block for any software, one should have a good knowledge of atleast some basic functions, so that one can use these functions effectively and in a precise manner.

So what to wait for, let’s start with the basic function “clc”.
                                                       
“clc” function: -

Clear Command Window

Alternatives: -

As an alternative to the clc function, you can also clear the command window by selecting Edit > Clear Command Window in the MATLAB desktop.

Syntax: -

clc

Description: -

clc function clears all inputs and outputs from the Command Window display, giving you a "clean screen” for the fresh use.
After using clc, you cannot use the scroll bar to see the history of functions, but you still can use the up arrow to recall statements from the command history.

Examples: -

1) Use clc in a MATLAB code file to always display output in the same starting position on the screen.

2) Use clc to clear the command window when you are unable to keep track of the functions you used previously or you want a clear screen to work with.

P.S: - Matlab is case sensitive software so take extra care in using the functions.

Hope to see you in next tutorial…!!!

Written By,

Student  Dheeraj Mor, VIT University