Filter löschen
Filter löschen

GUI

1 Ansicht (letzte 30 Tage)
Murali Mohan
Murali Mohan am 7 Jul. 2011
I woluld like to plot a image on any push button or toggle button
can you pls guide me.

Akzeptierte Antwort

Gerd
Gerd am 7 Jul. 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 Kommentare
Murali Mohan
Murali Mohan am 7 Jul. 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 am 7 Jul. 2011
Murali Mohan you accepted the wrong answer but thanks for posting the solution you chosen.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (2)

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

Melden Sie sich an, um zu kommentieren.


Paulo Silva
Paulo Silva am 7 Jul. 2011

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by