8-3 GUIDE ??範??

boӽdҤAڭ̱Nie@ӽdҡAn[J@s\A]NObϥΪ̿JXkƭȮɡ]ӤjBӤpBDƭȡBD¶q^ɡAε{^~TAðO~ơCF즹ؼСAڭ̥bε{ҰʮɡANn]w~ƬsAӷCo{~ɡAnܿ~TAӥBnN~ƥ[@C

ھګe覡Aڭ̥iHg GUIDE } myGui01AMIUԦuFile/Save AsKvNxs myGgui02C GUIDE |} myGui02.mAAb myGui02_OpeningFcn() 禡[JUCԭzG

handles.errorCount = 0;

ԭz[b uguidata(hObject, handles);veAHOҷs handles |QOdC ۡAڭ̥קr쪺ROAYN myText_Callback() ƪeקpG

value = str2double(get(handles.myText, 'String')); % P_O_ 0 M 1 ¶qƭ if isnumeric(value) & length(value)==1 & ... value >= get(handles.mySlider, 'Min') & ... value <= get(handles.mySlider, 'Max') set(handles.mySlider, 'Value', value); else % YXkA~ƥ[@AܬT handles.errorCount = handles.errorCount + 1; guidata(hObject, handles); % xss handles errMsg=['ƭȤXkG ', num2str(handles.errorCount), ' ~']; set(handles.myText, 'String', errMsg); end

榹ε{AbĤJXkƭȫAepUG

WzdҦbѽdҥؿ gui02.m M gui02.figC


MATLAB{]pGJg