資源描述:
《Al Ashi R.Y., Al Ameri A. Introduction to Graphical User Interface MATLAB 6.5 (UAE University)(en)(35s)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫(kù)。
1、IntroductiontoGraphicalUserInterface(GUI)MATLAB6.5UAEUNIVERSITYCOLLEGEOFENGINEERINGELECTRICALENGINEERINGDEPARTMENTIEEEUAEUSTUDENTBRANCHIntroductiontoGraphicalUserInterface(GUI)MATLAB6.5PresentedBy:RefaatYousefAlAshi199901469AhmedAlAmeri199900378CoordinatedBy:Prof.AbdullaIsmailAb
2、dulla1IntroductiontoGraphicalUserInterface(GUI)MATLAB6.5IntroductionAgraphicaluserinterface(GUI)isapictorialinterfacetoaprogram.AgoodGUIcanmakeprogramseasiertousebyprovidingthemwithaconsistentappearanceandwithintuitivecontrolslikepushbuttons,listboxes,sliders,menus,andsoforth.Th
3、eGUIshouldbehaveinanunderstandableandpredictablemanner,sothatauserknowswhattoexpectwhenheorsheperformsanaction.Forexample,whenamouseclickoccursonapushbutton,theGUIshouldinitiatetheactiondescribedonthelabelofthebutton.ThischapterintroducesthebasicelementsoftheMATLABGUIs.Thechapte
4、rdoesnotcontainacompletedescriptionofcomponentsorGUIfeatures,butitdoesprovidethebasicsrequiredtocreatefunctionalGUIsforyourprograms.1.1HowaGraphicalUserInterfaceWorksAgraphicaluserinterfaceprovidestheuserwithafamiliarenvironmentinwhichtowork.Thisenvironmentcontainspushbuttons,to
5、gglebuttons,lists,menus,textboxes,andsoforth,allofwhicharealreadyfamiliartotheuser,sothatheorshecanconcentrateonusingtheapplicationratherthanonthemechanicsinvolvedindoingthings.However,GUIsareharderfortheprogrammerbecauseaGUI-basedprogrammustbepreparedformouseclicks(orpossiblyke
6、yboardinput)foranyGUIelementatanytime.Suchinputsareknownasevents,andaprogramthatrespondstoeventsissaidtobeeventdriven.ThethreeprincipalelementsrequiredtocreateaMATLABGraphicalUserInterfaceare1.Components.EachitemonaMATLABGUI(pushbuttons,labels,editboxes,etc.)isagraphicalcomponen
7、t.Thetypesofcomponentsincludegraphicalcontrols(pushbuttons,editboxes,lists,sliders,etc.),staticelements(framesandtextstrings),menus,andaxes.Graphicalcontrolsandstaticelementsarecreatedbythefunctionuicontrol,andmenusarecreatedbythefunctionsuimenuanduicontextmenu.Axes,whichareused
8、todisplaygraphicaldata,arecreatedbythefunctiona