MATLAB Answers

0

How can I include an image into a GUI?

Asked by Tomy Duby on 13 May 2016
Latest activity Commented on by Tomy Duby on 15 May 2016
I need to include images (in .jpg or .bmp format) in certain locations in a GUI that I am preparing.
How can I do this? A simple example would be most useful.
Thanks Tomy

  0 Comments

Sign in to comment.

Tags

Products

1 Answer

Answer by Geoff Hayes
on 14 May 2016

Tomy - if you are using GUIDE to create your GUI, then just add one or more axes in the locations where you want to display the images. Then, in the _OpeningFcn of your GUI, load the images and place them in these axes using either imshow or image. In either of these calls, make sure that you specify the axes to which you want to display the image.

  1 Comment

Thanks, Geoff, this is exactly what I was looking for!
Tomy

Sign in to comment.