MATLAB基础学习 MATLABbasiclearning 分享兴趣,传播快乐, 增长见闻,留下美好! 亲爱的您, 这里是LearningYard学苑。 今天小编为大家带来的主题是Matlab基础学习, 欢迎您的用心访问, 本期推文阅读时常大约5分钟,请您耐心阅读。 Shareinterest,spreadhappiness, Increaseyourknowledgeandleavesomethingbeautiful! Dearyou, ThisisLearningYardAcademy。 ThetopicthattheeditorbringstoyoutodayisMatlabbasiclearning, Welcomeyourvisit, Thistweetusuallytakesabout5minutestoread,pleasereaditpatiently。 功能介绍 Features 数值和符号计算 MATLAB以矩阵作为数据操作的基本单位,无需预先指定维数(动态定维),能够按照IEEE的数值计算标准进行计算,提供非常丰富的数值计算函数,方便了用户与提高了计算效率,命令与数学中的符号、公式非常接近,可读性强,容易掌握,这使得矩阵运算变得非常简洁、方便和高效。 科研绘图 MATLAB提供了丰富的绘图命令,能实现点、线、面与立体的一系列可视化操作。使用该软件绘图十分方便,可以绘制各种图像,囊括了2D和3D图形,也可以对图像进行修饰控制,以增强图像的表现效果。 语言汇编 Matlab具有程序结构控制,函数调用,数据结构,输出输入,面向对象的程序设计语言特征。不仅简单易学,而且操作简便,对于数值结算,程序方针,计算机辅助设计等领域的人来说MATLAB是个理想的选择。 工具箱 工具箱是用MATLAB的基本语句编成的各种子程序集,用于解决某一方面的专门问题或实现某一类的新算法。工具箱可分为功能型和领域型工具箱。功能型工具箱主要用来扩充MATLAB的符号计算功能、图形建模仿真功能、文字处理功能以及与硬件实时交互功能,能用于多种学科。 Numericalandsymboliccalculation MATLABusesthematrixasthebasicunitofdataoperation。Itdoesnotneedtospecifythedimensioninadvance(dynamicfixeddimension)。ItcanperformcalculationsinaccordancewiththeIEEEnumericalcalculationstandard。Itprovidesaveryrichnumericalcalculationfunction,whichisconvenientforusersandimprovescalculationefficiency。Thesymbolsandformulasinmathematicsareveryclose,readableandeasytomaster,whichmakesmatrixoperationsveryconcise,convenientandefficient。 Researchdrawing MATLABprovidesawealthofdrawingcommands,whichcanrealizeaseriesofvisualoperationsofpoint,line,surfaceandthreedimensional。Itisveryconvenienttousethissoftwarefordrawing。Youcandrawavarietyofimages,including2Dand3Dgraphics,andyoucanalsocontroltheimagemodificationtoenhancetheperformanceoftheimage。 Languageassembly Matlabhasthecharacteristicsofprogramstructurecontrol,functioncall,datastructure,inputandoutput,andobjectorientedprogramminglanguage。Notonlyisiteasytolearn,butalsoeasytooperate。MATLABisanidealchoiceforpeopleinthefieldsofnumericalsettlement,programpolicy,andcomputeraideddesign。 Toolbox ThetoolboxisacollectionofvarioussubprogramscompiledwiththebasicstatementsofMATLAB,whichisusedtosolveacertainaspectofaspecialproblemorrealizeacertaintypeofnewalgorithm。Toolboxescanbepidedintofunctionalanddomainbasedtoolboxes。ThefunctionaltoolboxismainlyusedtoexpandMATLABssymboliccalculationfunctions,graphicalmodelingandsimulationfunctions,wordprocessingfunctions,andrealtimeinteractionwithhardware。Itcanbeusedinavarietyofdisciplines。 操作界面 Operationinterface 1、Matlab矩阵操作 矩阵的定义与构造 设置A〔12358546〕 B1:2:9 Crepmat(B,3,1)重复 1。Matlabmatrixoperation Thedefinitionandconstructionofmatrix SetA〔12358546〕 B1:2:9 Crepmat(B,3,1)repeat Dones(2,4)生成一个两行四列且值均为1的矩阵 Dones(2,4)generatesamatrixwithtworowsandfourcolumnsandthevaluesareall1。 2、矩阵运算 AB【矩阵转置】 A。B【矩阵乘法】 AB【矩阵对应数值相乘】 A。B【矩阵除法】 Aa【矩阵对应数值相除】 A。a【矩阵的乘方】 A【矩阵所有数值的乘方】 这里需要特别注意的是矩阵运算的点乘与点除,它们与普通的乘与除不同。点乘和点除表示两个矩阵相应位置的数值进行运算,而普通的乘与除是按照矩阵的乘除法规则进行计算。 以下为例: 2。Matrixoperations AB【Matrixtranspose】 A。B【MatrixMultiplication】 AB【Multiplythecorrespondingvaluesofthematrix】 A。B【MatrixDivision】 Aa【Dividethecorrespondingvaluesofthematrix】 A。a【Powerofmatrix】 A【Powerofallvaluesofthematrix】 Whatneedsspecialattentionhereisthedotmultiplicationanddotpisionofmatrixoperations,whicharedifferentfromordinarymultiplicationandpision。Dotmultiplicationanddotpisionindicatethatthevaluesofthecorrespondingpositionsofthetwomatricesarecalculated,whileordinarymultiplicationandpisionarecalculatedaccordingtotherulesofmatrixmultiplicationandpision。 Takethefollowingasanexample: 3、矩阵的下标 设置Amagic(5) 3。Thesubscriptofthematrix SetAmagic(5) BA(2,3)选取第二行,第三列 BA(2,3)selectthesecondrowandthethirdcolumn CA(3,:)表示选取第三行所有列 CA(3,:)meanstoselectallthecolumnsinthethirdrow DA(:,4)表示选取所有行的第四列 DA(:,4)meanstoselectthefourthcolumnofallrows 4、矩阵行列交叉选取 其他关键词命令 下列代码为命令行窗口执行的特殊指令: whos【查询数值属性】 clc【清除命令行窗口】 clear【清除变量】 clf【清除图形窗口】 cd【显示或者改变当前工作目录】 dir【显示当前目录或制定目录下的文件】 MATLAB有17个系统关键字,在命令行窗口输入指令iskeyword,即可得到关键字的列表,这里就不详细陈列了。 今天的分享就到这里了。 如果您对今天的文章有独特的想法, 欢迎给我们留言,让我们相约明天, 祝您今天过得开心快乐! Thatsitfortodayssharing。 Ifyouhaveauniqueideaabouttoday’sarticle, Welcometoleaveusamessage,letusmeettomorrow, Iwishyouahappydaytoday!