Azzera filtri
Azzera filtri

GUI

3 visualizzazioni (ultimi 30 giorni)
Murali Mohan
Murali Mohan il 7 Lug 2011
I woluld like to plot a image on any push button or toggle button
can you pls guide me.

Risposta accettata

Gerd
Gerd il 7 Lug 2011
Hi murali,
open GUIDE.
Place a button on the gui.
Go to the callback function
logo = imread('Logo.jpg','jpg');
image(logo);
Gerd
  8 Commenti
Murali Mohan
Murali Mohan il 7 Lug 2011
Hi Gerd,Paulo
thanks for the answer.:)
Apart from that I have added
[X map] = imread('up_button.gif');
iconU = ind2rgb(X,map);
set(handles.pushbutton,'CData',iconU);
Paulo Silva
Paulo Silva il 7 Lug 2011
Murali Mohan you accepted the wrong answer but thanks for posting the solution you chosen.

Accedi per commentare.

Più risposte (2)

Jan
Jan il 7 Lug 2011
Another approach:
pic = fullfile(tempdir, 'picture.png');
uicontrol('Style', 'pushbutton', ...
'String', '
<<file-----pic--.>>
');
  1 Commento
Murali Mohan
Murali Mohan il 7 Lug 2011
Thanks Jan :)

Accedi per commentare.


Paulo Silva
Paulo Silva il 7 Lug 2011

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by