MATLAB Answers


how to add a photo in the background of an app in appdesigner

how can I use an image in the background instead of just using a color (the blue one)
is this possible


Sign in to comment.

2 Answers

Answer by Melissa Williams on 10 May 2019
 Accepted Answer

The image component is available in App Designer as of MATLAB R2019a.

  1 Comment

Sign in to comment.

Answer by Melissa Williams on 10 May 2019

You can put an axes as the background for your app and add a startup function to populate it with your image file.
function startupFcn(app)
myImage = imread('peppers.png');
image(app.UIAxes, myImage);
You will want to set UIAxes title, xLabel, yLabel to blank in the Property Editor on the lower right. And XTick and YTicks = []
Best of luck.


This image will not render in App Designer, only when you run the app. It's likley the image needs to be located on your MATLAB path as well.
it is actually located on the path
solved , the first time I add a function not a callback
now it works

Sign in to comment.