Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I insert my foto in the MATLAB GUI?

share|improve this question

migrated from stackoverflow.com Dec 8 '09 at 12:09

This question came from our site for professional and enthusiast programmers.

Maybe this is a dumb question... is "my foto" some kind of app, or did you mean to say "one of my photographs/images"? –  gnovice Dec 7 '09 at 22:21

4 Answers 4

I work for MathWorks and recently made a video about inserting an image into a MATLAB GUI. You can view the video on the MATLAB blog.

share|improve this answer

This is one of many ways to insert an image in a MATLAB GUI:

function hello_world
fig1=figure(  'Name','Figure with a Background Image','Menu','none', ... NumberTitle','off','Unit','normalized', ... 'Position',[.45 .45 .1 .1]);
load mandrill
image(X);colormap(map); %   <-- Plotting the image in the background...
set(gca,'position',[0 0 1 1]);%   <-- It would be ideal to explicitly specify the axis handle here...
axis off; axis equal

button1=uicontrol(fig1,'Style','pushbutton','Unit','Normalized', ... 'Position',[.2 .1 .6 .4],'String','Close','Callback',{@action_Callback});

function action_Callback(~,~)
    % On an earlier version of MATLAB, type:
    % function action_Callback(a,b)
    % instead, for example...
share|improve this answer

Can't say much with your description, but you'll want to look at

help imageview
share|improve this answer

I wrote some lines of code for inserting an image into a MATLAB GUI without using the GUIDE.


This particular set of code does not look very clean, but does work, and does not require the Image Processing Toolbox. (The function "imshow" used in Doug's video requires the toolbox.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.