how to create a Fig for GUI?
이전 댓글 표시
In fact I want to create a Fig for GUI and then start to make a GUI should I do that ? or there is any other way?
답변 (3개)
Paulo Silva
2011년 9월 8일
Just type and execute:
guide
and have fun with it, don't forget to read the documentation
doc guide
The other way is to do it all on one function with subfunctions and lots of code, start with guide and when you feel comfortable using it you can do all with code, no .fig file required.
Jan
2011년 9월 8일
Beside using GUIDE, you can create a GUI manually also. Some examples can be found in the toolboxes, e.g. read the sources of MSGBOX, LISTDLG and HELPDLG. A minimal example:
DlgH = figure;
ButtonH = uicontrol('Sytle', 'PushButton', 'Position', [10, 10, 100, 22], ...
'String', 'Button', 'Callback', 'disp(clock)');
[EDITED]: Please use "Style" instead of the typo "Sytle"!
You will get a more specific answer, if you explain your demands with any details.
Niki
2011년 9월 8일
0 개 추천
댓글 수: 4
Grzegorz Knor
2011년 9월 8일
Of course, there is a many ways to do that, for example:
whitebg(M,'r')
set(M,'Position',[600 600 250 100])
Niki
2011년 9월 8일
Niki
2011년 9월 8일
Walter Roberson
2011년 9월 8일
I would recommend instead using
m = load('clown');
m2 = ind2rgb(m.X, m.map);
image(m2);
Otherwise you "use up" your one and only figure colormap on a frill. Keep in mind: you can only have one colormap per figure.
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!