matlab-programing-for-engineers英文课件PPT推荐.ppt

上传人:b****1 文档编号:13885167 上传时间:2022-10-14 格式:PPT 页数:260 大小:2.28MB
下载 相关 举报
matlab-programing-for-engineers英文课件PPT推荐.ppt_第1页
第1页 / 共260页
matlab-programing-for-engineers英文课件PPT推荐.ppt_第2页
第2页 / 共260页
matlab-programing-for-engineers英文课件PPT推荐.ppt_第3页
第3页 / 共260页
matlab-programing-for-engineers英文课件PPT推荐.ppt_第4页
第4页 / 共260页
matlab-programing-for-engineers英文课件PPT推荐.ppt_第5页
第5页 / 共260页
点击查看更多>>
下载资源
资源描述

matlab-programing-for-engineers英文课件PPT推荐.ppt

《matlab-programing-for-engineers英文课件PPT推荐.ppt》由会员分享,可在线阅读,更多相关《matlab-programing-for-engineers英文课件PPT推荐.ppt(260页珍藏版)》请在冰豆网上搜索。

matlab-programing-for-engineers英文课件PPT推荐.ppt

70%TestsAnin-classopen-bookfinal,1Introduction(1.1-1.5)2MATLABBasics(2.1-2.10,2.13,2.14)3Top-downProgramDesign(3.1-3.2)4RelationalandLogicalOperators(3.3,4.3)5BranchesandLoops(3.4,4.1,4.2,4.4)6Plotting(2.11,3.5,6.4,6.5)7User-definedFunctions(5.1-5.9)8ComplexDataandCharacterData(6.1-6.3)9Input/OutputFunctions(8.1-8.11)10SparseArrays,CellArrays,andStructures(7.1-7.5),Contents,IntroductiontoMATLAB,MATrixLABoratory,MATLABarrayAdvantagesofMATLABEaseofusePlatformindependencePredefinedfunctionsPlottingDisadvantagesofMATLABCanbeslowaninterpretedlanguageExpensive,MATLABEnvironment,MATLABDesktopCommandWindowFigureWindowsEdit/DebugWindowCommandHistoryWindowLaunchPadWorkspaceBrowserandArrayEditorHelpBrowserCurrentDirectoryBrowser,MATLABDesktop,WorkspaceBrowser,CommandWindow,CurrentDirectoryBrowser,CommandHistoryWindow,Tovieworchangethecurrentdirectory,HelpBrowser,MATLABDesktop,LaunchPad,TheCommandWindow,Thecommandprompt()ispredefined,usepiEllipsis(),continuingonthenextlinex1=1+1/2+1/3+1/4+1/5+1/6;

andx1=1+1/2+1/3+1/4+1/5+1/6;

TheCommandHistoryWindow,TheLaunchPad,TheEdit/DebugWindow,CreatenewM-files“File/New/M-file”ClickingtheToolbariconOpenanexistingone“File/Open”ClickingtheToolbaricon,TheEdit/DebugWindow,FigureWindows,TheMATLABWorkspace,whosvar1clearDeletesallvariablesclearvar1var2,TheWorkspaceBrowser,GettingHelp,UsetheHelpBrowserSelectingtheHelpiconTypinghelpdeskorhelpwinintheCommandwindow,GettingHelp,Command_lineorientedwaytogethelpTypehelporhelpfun1inthecommandwindowSearchesforanexactfunctionnamematchTypelookforcommandSearchesthequicksummaryinformationineachfunctionforamatch,AFewImportantCommands,Typedemoorselect“demos”intheLaunchPadclcclfClearc(control-c),abort!

Invokeoperatingsystemcommanddiary(diaryfileneme,diaryoff,diaryon),TheMATLABSearchPath,EnteranameattheMATLABpromptLookforthenameasavariableChecktoseeifitisabuilt-infunctionorcommandChecktoseeifitisanM-fileinthecurrentdirectoryChecktoseeifitisanM-fileinanydirectoryinthesearchpath,TheMATLABSearchPath,ProgrammingPitfallsNeveruseavariablewiththesamenameasaMATLABfunctionorcommandNevercreateanM-filewiththesamenameasaMATLABfunctionorcommandExamineandmodifysearchpath“File/SetPath”,editpath,pathtoolpathcommand,UsingMATLABasaScratchpad,+,-,*,/,Forexampler=0.1;

l=0.5;

V=A*l;

A=pi*r2;

V=A*lV=0.0157,2022/10/14,MathematicalModeling,24,MATLAB常用数学函数

(1),三角函数和双曲函数,2022/10/14,MathematicalModeling,25,MATLAB常用数学函数

(2),指数函数,取整函数和求余函数,2022/10/14,MathematicalModeling,26,MATLAB常用数学函数(3),矩阵变换函数,复数函数,2022/10/14,MathematicalModeling,27,MATLAB常用数学函数(4),矩阵函数,2022/10/14,MathematicalModeling,28,MATLAB常用数学函数(5),其他函数,Homework,Quiz1.1Exercises1.1,1.4,MATLABBasics,MATLABBasics,Aprogramcanbeinputcommandbycommandusingthecommandline(linesstartingwith“”ontheMATLABdesktop)asaseriesofcommandsusingafile(aspecialfilecalledM-file)Ifacommandisfollowedbyasemicolon(;

),resultofthecomputationisnotshownonthecommandwindow,MATLABBasics:

Variables,Variableisanamegiventoareservedlocationinmemoryclass_code=111;

number_of_students=65;

name=SichuanNormalUniversity;

radius=5;

area=pi*radius2;

MATLABBasics:

Variables,UsemeaningfulnamesforvariablesMATLABvariablenamesmustbeginwithalettercancontainanycombinationofletters,numbersandunderscore(_)mustbeuniqueinthefirst31charactersMATLABiscasesensitive:

“name”,“Name”and“NAME”areconsidereddifferentvariablesNeveruseavariablewiththesamenameasaMATLABcommandNamingconvention:

uselowercaseletters,MATLABBasics:

Arrays,Thefundamentalunitofdataisarrayscalarvaluevectormatrix,MATLABBasics:

InitializingVariables,Initializationusingassignmentstatementsx=5x=5y=x+1y=6vector=1234vector=1234,matrix=123;

456matrix=123456matrix=123;

45?

Errora=5(2+4)a=56,MATLABBasics:

InitializingVariables,Initializationusingshortcutstatementscolonoperatorfirst:

increment:

lastx=1:

2:

10x=13579y=0:

0.1:

0.5y=00.10.20.30.40.5,MATLABBasics:

InitializingVariables,transposeoperatoru=1:

3u=123v=uuv=112233,v=u;

uv=123123,MATLABBasics:

InitializingVariables,Initializationusingbuilt-infunctionszeros()x=zeros

(2)x=0000z=zeros(2,3)z=000000ones(),size(),length(),y=zeros(1,4)y=0000t=zeros(size(z)t=000000,MATLABBasics:

InitializingVariables,Initializationusingkeyboardinputinput()value=input(Enteraninputvalue:

)Enteraninputvalue:

1.25value=1.2500name=input(Whatisyourname:

s)Whatisyourname:

Selimname=Selim,MATLABBasics:

InitializingVariables,Initializationc(:

:

1)=123;

456;

c(:

2)=789;

10111

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 党团工作 > 党团建设

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1