This command adds a label to the y-axis of the plot. The general syntax for its use is
ylabel('label')
or in the alternate form
ylabel 'label'
or simply
ylabel label
Here label is a string variable.
Here is an example of a simple plot with a label on the y-axis.
--> x = linspace(-1,1);
--> y = cos(2*pi*x);
--> plot(x,y,'r-');
--> ylabel('cost');
which results in the following plot.