If you are not using xlabel , you can use this as a quick hack.
If you are using xlabel , add another line or two, passing in an array of cells:
figure; xlabel({'X-label', '', 'Figure title'});
As Amro noted in his comments, you can make text anywhere using uicontrol :
x=linspace(0,10*pi); plot3(x,x.*cos(x),x.*sin(x)); % Plot a 3d spiral uicontrol('Style','text','Position', [200 20 200 20],'String','My Title')
Positioning is not automatic, so when you resize a picture, the name will move away from the center.
source share