欢迎来到天天文库
浏览记录
ID:40390661
大小:224.00 KB
页数:50页
时间:2019-08-01
《Matlab - Numerical Analysis with MATLAB》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、 MATLABhasmanytoolsthatmakethispackagewellsuitedfornumericalcomputations.Thistutorialdealswiththerootfinding,interpolation,numericaldifferentiationandintegrationandnumericalsolutionsoftheordinarydifferentialequations.Numericalmethodsoflineara
2、lgebraarediscussedinTutorial4. FunctionDescriptionabsAbsolutevaluedblquadNumericallyevaluatedoubleintegralerfErrorfunctionfevalExecutefunctionspecifiedbystringfzeroScalarnonlinearzerofindinggammaGammafunctioninlineConstructINLINEobjectinterp1One-dimensionali
3、nterpolationinterp2Two-dimensionalinterpolationlinspaceEvenlyspacedvectormeshgridXandYarraysfor3-DplotsnormMatrixorvectornormode23Solvenon-stiffdifferentialequationsode45Solvenon-stiffdifferentialequationsode113Solvenon-stiffdifferentialequationsode15sSolvestiffdifferentialequationsode2
4、3sSolvestiffdifferentialequationspolyConvertrootstopolynomialpolyvalEvaluatepolynomialppvalEvaluatepiecewisepolynomialquadNumericallyevaluateintegral,lowordermethodquad8Numericallyevaluateintegral,higherordermethodrcondReciprocalconditionestimatorrootsFindpolynomialrootssplineCubicsplin
5、edatainterpolationsurf3-DcoloredsurfaceunmkppSupplydetailsaboutpiecewisepolynomial2!"#Acentralproblemdiscussedinthissectionisformulatedasfollows.Givenareal-valuedfunctionnnf:,n1,findavectorrsothatf(r)=0.Vectorriscalledtherootorzerooff.5.2.1Computingrootsoftheunivariatepolyn
6、omialsPolynomialsarerepresentedinMATLABbytheircoefficientsinthedescendingorderofpowers.32Forinstance,thecubicpolynomialp(x)=3x+2x-1isrepresentedasp=[3201];Itsrootscanbefoundusingfunctionrootsformatlongr=roots(p)r=-1.000000000000000.16666666666667+0.55277079839257i0.16666666666667-0.5527
7、7079839257iTocheckcorrectnessofthisresultweevaluatep(x)atrusingfunctionpolyvalerr=polyval(p,r)err=1.0e-014*0.222044604925030+0.01110223024625i0-0.01110223024625iToreconstructapolynomialfromitsrootsonecanusefunctionpoly.Usingtherootsrcomputedearlierweobtainpoly(r)ans=1.000000000
此文档下载收益归作者所有