Comments are an integral part of any programming language.
Comments help to identify program purpose and explain the work of particular statements in a program. Comments also allow others to understand the code. Comments can be used as help for a program.
Suppose, You have prepared a function in MATLAB. Your function has many inputs and outputs. Your final user can not know the ways of working with your function. If you have written a comment for your MATLAB code, The user of your function can understand the allowed inputs and meaning of outputs.

To comment out multiple lines of code, we can use the block comment operators, %{ and % } :


We can also create quick, one-line comments with operator %.
The next line of code demonstrates this.

%IMSHOW Display image in Handle Graphics figure.  
%   IMSHOW(I) displays the grayscale image I.
  if parent_specified