资源描述:
《Experiments with MATLAB.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ExperimentswithMATLABCleveMolerOctober4,2011iiCopyright2011CleveMolerElectroniceditionpublishedbyMathWorks,Inc.http://www.mathworks.com/molerContentsPrefaceiii1Iteration12FibonacciNumbers173CalendarsandClocks334Matrices455LinearEquations636FractalFern757GooglePageRank838ExponentialFunction979T
2、Puzzle11310MagicSquares12311TicTacToeMagic14112GameofLife15113MandelbrotSet16314Sudoku18315OrdinaryDifferentialEquations19916Predator-PreyModel21317Orbits22118ShallowWaterEquations241iiiivContents19MorseCode24720Music263ExperimentswithMATLAB⃝RCleveMolerCopyright⃝c2011CleveMoler.Allrightsreserve
3、d.Nopartofthise-bookmaybereproduced,stored,ortrans-mittedinanymannerwithoutthewrittenpermissionoftheauthor.Formoreinformation,contactmoler@mathworks.com.Theprogramsdescribedinthise-bookhavebeenincludedfortheirinstructionalvalue.Theseprogramshavebeentestedwithcarebutarenotguaranteedforanypartic
4、ularpurpose.Theauthordoesnotofferanywarrantiesorrepresentations,nordoesheacceptanyliabilitieswithrespecttotheuseoftheprograms.Theseprogramsshouldnotbereliedonasthesolebasistosolveaproblemwhoseincorrectsolutioncouldresultininjurytopersonorproperty.Matlab⃝RisaregisteredtrademarkofMathWorks,Inc.TM
5、.FormoreinformationaboutrelevantMathWorkspolicies,see:http://www.mathworks.com/company/aboutus/policies_statementsOctober4,2011iiContentsPrefaceFigure1.exmguiprovidesastartingpointforsomeoftheexperiments.WelcometoExperimentswithMATLAB.Thisisnotaconventionalbook.Itiscurrentlyavailableonlyviathe
6、Internet,atnocharge,fromhttp://www.mathworks.com/molerTheremayeventuallybeahardcopyedition,butnotrightaway.AlthoughMatlabisnowafullfledgedTechnicalComputingEnvironment,itstartedinthelate1970sasasimple“MatrixLaboratory”.Wewanttobuildonthislaboratorytraditionbydescribingaseriesofexperimentsinvolv
7、ingappliedmathematics,technicalcomputing,andMatlabprogramming.iiiivPrefaceWeexpectthatyoualreadyknowsomethingabouthighschoollevelmaterialingeometry,algebra,andtrigonometry.Wewillintroduceideasfromcalculus,matrixtheory,andordinarydifferen