www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/AddTitletoCurrentFigureExample.m

    %% Add Title to Current Axes  
% Create a figure and display a title in the current axes.   

%%  
plot((1:10).^2)
title('My Title')  

%% 
% You also can call |title| with a function that returns text. For example,
% the |date| function returns text with today's date.  
title(date) 

%%
% MATLAB(R) sets the output of |date| as the axes title.