8-4 GUIDE ??範??

boӽdҤAϥΪ̥iHϥΤUԦӿPnɮסAܪiΡAåinC

Aڭ̥iH\m@ӹ϶bM@ UI ApUG

ۡAڭ̥iHϥηƹkIC@ UI AÿuInspect PropertiesvAHܨʽACӪҧܪʽpUG

oǤu@AU@Bڭ̭nwqC UI 󪺤ROAMATLAB |bo UI QIɡAPɩIsCӪҹROCAڭ̥HƹkI Close sAÿuView Callbacks/CallbackvAYi} MATLAB {s边C]pGA|sɡAMATLAB |nDAsɡA~~CAiHNɮxs myGUI03.mC^{s边|ܤRO[JmḀҦӨAClose s Tag O closeButtonAҥHRO][b closeButton_Callback Aҥ[ihROO close(gcbf)ApUG

bo@C{XAgcbf NͦROA] close(gcbf) YON GUI ҦbCo@O۷nΡAizpUG

ϥΤWzkAڭ̥iH@@[JU UI Ҩ㦳ROCUԦAڭ̦b soundFile_Callback() 禡ҥ[J{XpUG

value=get(hObject, 'value'); % o UI 󪺿ﶵ switch value % ̿ﶵӸJn case 1 load chirp.mat case 2 load handel.mat case 3 load laughter.mat end plot((1:length(y))/Fs, y); % eXni handles.y=y; % nT handles.Fs=Fs; % Wv guidata(hObject, handles); % xsNΩL禡 handles

wWzROApUG

uPlay SoundvsAڭ̦b playButton_Callback() 禡ҥ[J{XpUG

if isfield(handles, 'y') y=handles.y; Fs=handles.Fs; sound(y, Fs); end

yܻAڭ̥ϥ isfield(handles, 'y') ӽT{ y OO handles @өʽAYOANnƤwgxsb handles ܼƤA]ڭ̴NX y M FsAå sound(y, Fs) ӼnTC

[JoǤROAYixsɮר MATLAB s边AMU GUIDE uCTΫsAYi}ҥiϥΪ GUI ApUG

YbUԦ handelAYieXqniΡAɦAUuPlay SoundvAYiťťqnA]Oon}z^AepUG

WzdҦbdҵ{ؿ gui03.m M gui03.figC

pGڭ̧Ʊ@}ҵeA϶bN chirp.mat niΡAAiHק myGUI_OpeningFcn()A禡b GUI eAN|QIs@A]ڭ̥iHboӨ禡AŪJ chirp.matAMiεeXӡAo˴N chirp.mat iΦb myGUI.m QIsANߨܦbCUŪ̥iHոլݡI


MATLAB{]pGJg