MATLAB: Give title to a background image in gui

gui

i inserted a background image to my gui… can i add title to it? if yes, please ca someone help me how to give a title on the north center of my gui
% create an axes that spans the whole gui
ah = axes('unit', 'normalized', 'position', [0 0 1 1]);
% import the background image and show it on the axes
bg = imread('example.jpg'); imagesc(bg);
% prevent plotting over the background and turn the axis off
set(ah,'handlevisibility','off','visible','off')
% making sure the background is behind all the other uicontrols
uistack(ah, 'bottom');

Best Answer

You can't give a title if it takes up the whole screen because titles go above images. However you can put text on the image with text(), or you can give a title to your window with set():
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')