필터 지우기
필터 지우기

GUI

조회 수: 3 (최근 30일)
Murali Mohan
Murali Mohan 2011년 7월 7일
I woluld like to plot a image on any push button or toggle button
can you pls guide me.

채택된 답변

Gerd
Gerd 2011년 7월 7일
Hi murali,
open GUIDE.
Place a button on the gui.
Go to the callback function
logo = imread('Logo.jpg','jpg');
image(logo);
Gerd
  댓글 수: 8
Murali Mohan
Murali Mohan 2011년 7월 7일
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 2011년 7월 7일
Murali Mohan you accepted the wrong answer but thanks for posting the solution you chosen.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Jan
Jan 2011년 7월 7일
Another approach:
pic = fullfile(tempdir, 'picture.png');
uicontrol('Style', 'pushbutton', ...
'String', '
<<file-----pic--.>>
');
  댓글 수: 1
Murali Mohan
Murali Mohan 2011년 7월 7일
Thanks Jan :)

댓글을 달려면 로그인하십시오.


Paulo Silva
Paulo Silva 2011년 7월 7일

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by