GUI 만들기
- 최초 등록일
- 2010.05.26
- 최종 저작일
- 2009.11
- 8페이지/ 한컴오피스
- 가격 3,500원
소개글
matlab을 이용하여 두 종류의 GUI program을 생성하고 확인한다.
p.s) GUI관련 matlab교재에 기재되어 있는 예제 source coding을 참고하여 작성한
매우 간단한 GUI입니다.
목차
1. 개 요
2. 문 제
3. 고찰 및 의견
4. 참고자료
본문내용
1. 개 요
-두 종류의 GUI를 만든다.
2. 문 제
1) 그래프에 grid를 on/off하는 GUI
코딩
function GUIEx5_1(str_comma
if nargin==0
x=-3:0.1:3;
y=x.^2+3*x-3;
plot(x,y)
set(gcf,`color`,`w`);
set(gcf,`units`,`normalize`,`position`,[0.23 0.36 0.44 0.53])
GridOnBt=uicontrol(`units`,`nor`,`pos`,[0.55 0.8 0.26 0.07], `style`,`pushbutton`)
set(GridOnBt,`string`,`Grid On`,`callback`,`GUIEx5_1("msgGridOn");`)
GridOffBt=uicontrol(`units`,`nor`,`pos`,[0.55 0.72 0.26 0.07],`style`,`pushbutton`)
set(GridOffBt,`string`,`Grid Off`,`callback`,`GUIEx5_1("msgGridOff");`)
else
switch str_command
case `msgGridOn`
set(gca,`xgrid`,`on`,`ygrid`,`on`)
case `msgGridOff`
set(gca,`xgrid`,`off`,`ygrid`,`off`)
end
end
결과물
참고 자료
- 신호 및 시스템 실습자료
- MATLAB GUI POWER, 임종수
- MATLAB 고급 GUI 개발, 여영구 역