8-2 GUIDE ??範?一

Aڭ̥ GUIDE jp]igѩ񭱪kUIӹF^AæbWmӱA@ӬOuQv]Slider^At@ӬOuisrv]Edit Text^ApUG

ۡAڭ̥iHϥηƹkI@ UI AÿuInspect PropertiesvAHܨʽCHWQҡAHƹkIAuInspect PropertiesvAYi}ҡuʽ˵v]Property Inspector^A~[pUG

bʽ˵AO󪺩ʽAkhOʽҹȡAڭ̥iHIkӧܳoǭȡCڭ̭nơANO]wثeOWӪ󪺥NA惡󪺳BzAڭ̳|ھڦNӶiCgѡuʽ˵vAڭ̥iHipUG

N]wAڭ̴NiH]w󪺤ROCڭ̧ƱoǤROϳo GUI ε{FUC\G

b GUIDE ҤUA@Ӫ󪺤ROOѤ@ӯSw禡ӧAoӨ禡N٬禡AӨ禡WٴNOuN_CallbackvC

Aڭ̥HƹkIQAÿuView Callbacks/CallbackvAYi} MATLAB {s边C]pGA|sɡAMATLAB |nDAsɡA~~CAiHg GUIDE DeNɮxs myGui01.figAҦ{XY|Qxs myGui01.mC^{s边|ܤRO[JmḀҦӨAQ Tag O mySliderAҥH禡O mySlider_Callback()Aҥ[ihCԭzpUG

position = num2str(get(handles.mySlider, 'Value')); set(handles.myText, 'String', position);

䤤Ĥ@CԭzXQmAনƭȡAĤGChNƭȳ]wr쪺ܤrC[JmpUҥܡG

ϥάۦP覡Aڭ̤]iH[Jr쪺ROA禡O myText_Callback()Aҥ[ihCԭzpU

value = str2double(get(handles.myText, 'String')); set(handles.mySlider, 'Value', value);

䤤Ĥ@COXr쪺ܤrAMনƭȡAMbĤGCNQm]wƭȡC[JmpUҥܡG

[JoǤROAYixsɮר MATLAB s边AMU GUIDE uCTΫsAYi}ҧڭ̩ҳ]p GUI pUG

AiHʩQAmN|ܦbr줺FA]iHקr쪺ȡAӫwQmC

pGAwg]py{AɥiH GUIDE DeCuݦb MATLAB J myGui01AYi}ҩҳ]p GUI {eCYٻݭni GUI {קAuݦb MATLAB J guide myGuide01AYi} GUIDE De~i GUI {]pAҦp[JséwqROC

WzdҤwgbѽdҥؿ gui01.m M gui01.figC

qoӽdҤڭ̥iHDAb]pROɡA̭nơANOnP UI 󳣯sLHάơA]C@ UI 󪺤ROOH禡ӶiA] GUIDE bC@Ӥ禡ѤF@ӵcܼ handlesAHKѸƪ@qAiFUCⶵ\G

  1. iHg handles ӦsΨΦ@qơC
  2. iHg handles ӨoC@ UI 󪺩ʽC

ҦpAYnbY@ӱ󪺤禡sܼ AAiH[JUCԭzG

handles.myData = A; % Nܼ A sb handles myData guidata(hObject, handles) % Ns handles s^ GUI

pGnbt@ӱ󪺤禡̭ϥܼ AAun[JUCԭzYiG

A = handles.myData;

t~Ahandles ]]tFP@ GUI UҦAHW@`dҨӻAڭ̩wqFӱ TagA]AiHb@Ӥ禡ΨC@ӱApUG

handles.mySliderGQ handles.myTextGr쪫

pG GUI W٬O myGUIA handles.myGUI NO GUI ϧΡA]YnA]iHϥΤUCԭzG

delete(handles.myGUI)
MATLAB{]pGJg