Danh mục

Lecture note Data visualization - Chapter 32

Số trang: 24      Loại file: pptx      Dung lượng: 284.44 KB      Lượt xem: 12      Lượt tải: 0    
tailieu_vip

Xem trước 3 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

This chapter presents the following content: Matlab environment, built-in matlab functions, plotting, user-defined functions, numerical techniques, matlab environment, numerical techniques,...
Nội dung trích xuất từ tài liệu:
Lecture note Data visualization - Chapter 32Lecture32Chapter4InheritanceInheritanceisapowerfulfeaturethatallowsthereuseof code.However,besurethatfunctionsappliedtoobjectscreated atruntimethroughthenewoperatorareboundatrun time.Thisfeatureisknownasdynamicbinding,andthe useofvirtualfunctionsisrequiredtoensurethatruntime decisionsaremade.Rereadthischapterasoftenasnecessarytoensurethat youunderstandthedistinctionsamong nonvirtualfunctionsChapter6“AlgorithmAnalysisInthischapterweintroducedalgorithmanalysisand showedthatalgorithmicdecisionsgenerallyinfluencethe runningtimeofaprogrammuchmorethanprogramming tricksdoWealsoshowedthehugedifferencebetweentherunning timesforquadraticandlinearprogramsandillustratedthat cubicalgorithmsare,forthemostpart,unsatisfactoryWeexaminedanalgorithmthatcouldbeviewedasthe basisforourfirstdatastructureThebinarysearchefficientlysupportsstaticoperations therebyprovidingalogarithmicworstcasesearchDataVisualizationwithMATLABChapter2“MATLABEnvironment”Chapter3“BuiltinMATLABFunctions”Chapter5“Plotting”Chapter6“UserDefinedFunctions”Chapter13“NumericalTechniques”Chapter2MATLABEnvironmentInthischapter,weintroducedthebasicMATLAB structureTheMATLABenvironmentincludesmultiplewindows, fourofwhichareopeninthedefaultview: Commandwindow Commandhistorywindow Workspacewindow CurrentfolderwindowInaddition,theContinued….VariablesdefinedinMATLABfollowcommoncomputer namingconventions: Namesmuststartwithaletter. Letters,numbers,andtheunderscorearetheonlycharacters allowed. Namesarecasesensitive. Namesmaybeofanylength,althoughonlythefirst63 charactersareusedbyMATLAB SomekeywordsarereservedbyMATLABandcannotbe usedasvariablenames MATLABallowstheusertoreassignfunctionnamesasContinued….Matricesoftenstorenumericinformation,althoughthey canstoreotherkindsofinformationaswellDatacanbeenteredintoamatrixmanuallyorcanbe retrievedfromstoreddatafilesWhenenteredmanually,amatrixisenclosedinsquare brackets,elementsinarowareseparatedbyeither commasorspaces,andanewrowisindicatedbya semicolon: a=[1234;5678]EvenlyspacedmatricescanbegeneratedwiththecolonContinued….MATLABfollowsthestandardalgebraicorderof operationsMATLABsupportsbothstandard(decimal)andscientific notationItalsosupportsanumberofdifferentdisplayoptions.No matterhowvaluesaredisplayed,theyarestoredas doubleprecisionfloatingpointnumbersMATLABvariablescanbesavedorimportedfrom either.MATor.DATfilesThe.MATformatisproprietarytoMATLABandisused becauseitstoresdatamoreefficientlythanotherfileChapter3“BuiltinMATLAB FunctionsGeneralmathematicalfunctions,suchas exponentialfunctions logarithmicfunctions rootsRoundingfunctionsFunctionsusedindiscretemathematics,suchas factoringfunctions primenumberfunctionsTrigonometricfunctions,includingContinued….Dataanalysisfunctions,suchas maximaandminima averages(meanandmedian) sumsandproducts sorting standarddeviationandvarianceRandomnumbergenerationforboth uniformdistributions Gaussian(normal)distributionsChapter5“PlottingThemostcommonlyusedgraphinengineeringisthex– yplotThistwodimensionalplotcanbeusedtographdataorto visualizemathematicalfunctionsNomatterwhatagraphrepresents,itshouldalways includeatitleandxandyaxislabelsAxislabelsshouldbedescriptiveandshouldinclude units,suchasft/sorkJ/kgMATLABincludesextensive optionsforcontrollingtheappearanceofyourplotsTheusercanspecifythecolor,linestyle,andmarkerstyle foreachlineonagraphContinued….Inadditiontox–yplots,MATLABoffersavarietyof plottingoptions,includingpolarplots,piecharts,bar graphs,histograms,andx–ygraphswithtwoy–axesThescalingonx–yplotscanbemodifiedtoproduce logarithmicplotsoneitherorbothx–andyaxesEngineersoftenuselogarithmicscalingtorepresentdata asastraightlineThefunctionfplotallowstheusertoplotafunction withoutdefiningavectorofxandy–valuesMATLABautomaticallychoosestheappropriatenumberContinued….ThethreedimensionalplottingoptionsinMATLAB includealineplot,anumberofsurfaceplots,andcontour plotsMostoftheoptionsavailableintwodimensionalplotting alsoapplytothesethreedimensionalplotsThemeshgridfunctionisespeciallyusefulincreating threedimensionalsurfaceplotsInteractivetoolsallowtheusertomodifyexistingplotsThesetoolsareavailablefromthefiguremenubarPlotscanalsobecreatedwiththeinteractiveplotting optionfromtheworkspacewindowChapter6“UserDefinedFunctionsMATLABcontainsawidevarietyofbuiltinfunctionsHowever,youwilloftenfinditusefultocreateyourown MATLABfunctionsThemostcommontypeofuserdefinedMATLAB functionisthefunctionMfile,whichmuststartwitha functiondefinitionlinethatcontains thewordfunction avariablethatdefinesthefunctionoutput afunctionname avariableusedfortheinputargumentContinued….ThefunctionnamemustalsobethenameoftheMfilein whichthefunctionisstoredFunctionnamesfollowthestandardMATLABnaming rulesLikethebuiltinfunctions,userdefinedfunctionscan acceptmultipleinputsandcanreturnmultipleresultsCommentsim ...

Tài liệu được xem nhiều: