Azzera filtri
Azzera filtri

How to display image in a GUI programmatically (without GUIDE)

2 visualizzazioni (ultimi 30 giorni)
Hi everyone,
I have created a GUI (without GUIDE) in which I have added an "axes" as follows:
logo_tos = axes('parent', amfig, 'Position', [0.098 .25 .8 0.8], 'Units', 'normalized', 'color', 'w');
to display an image. The code that I have used is:
logo = imread ('myimage.PNG');
But it doesn't show anything. Could anyone please tell me what I'm missing here? I'd be very grateful.
  1 Commento
Stephen23
Stephen23 il 17 Mag 2015
imread only reads the file into MATLAB's memory, exactly as the documentation states. To display an image you need to use another command, such as image

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 17 Mag 2015
You still need to
image(logo, 'Parent', logo_tos);

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by