MATLABExamplesontheuseofode23andode45:
Example1:Useode23andode45tosolvetheinitialvalueproblemforafirstorder
differentialequation:
−ty
y=,(y0)=1,[0t,∈5]
2−y2
FirstcreateaMatLabfunctionandnameitfun1.m.
functionf=fun1(t,y)
f=-t*y/sqrt(2-y^2);
NowuseMatLabfunctionsode23andode45tosolvetheinitialvalueproblem
numericallyandthenplotthenumericalsolutionsy,respectively.IntheMatLabwindow,
typeinthefollowingcommandslinebyline.
您可能关注的文档
- Basic Understanding of MATLAB 对 MATLAB 的基本了解.doc
- Matlab Total Academic Headcount (TAH) Toolboxes Matlab 总学术人数 (TAH) 工具箱.pdf
- Profiling, Optimization, and Acceleration of MATLAB code MATLAB 代码的分析、优化和加速.pdf
- MATLAB for Engineers with Application (ME 1311) Course ... MATLAB 工程师应用 (ME 1311) 课程.pdf
- Subject Line- Campus-wide Access to MATLAB and Simulink 主题行:全校范围内访问 MATLAB 和 Simulink.pdf
- Matlab Kernel for Jupyter Notebooks 适用于 Jupyter 笔记本的 Matlab 内.pdf
- JMP Extensibility Synergy with MATLAB JMP 可扩展性与 MATLAB 的协同作用.pdf
- A MATLAB Primer in Four Hours with Practical Examples 四小时内了解 MATLAB 入门知识并附有实际示例.pdf
- Guidelines on how to install Matlab on your computer 有关如何在计算机上安装 Matlab 的指南.pdf
- Parallel and Distributed Computing with MATLAB 使用 MATLAB 进行并行和分布式计算.pdf
原创力文档

文档评论(0)