matlab ode45输出数值解,matlab 中ode45的源代码如何看懂

news/2024/7/2 1:25:09

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

求常微分方程的数值解 ode45方法的源代码怎么看懂呢?四百多行 如何理解这些代码的核心思想 以方便未来自己使用呢?求大神指点迷津 感激不尽

function varargout = ode45(ode,tspan,y0,options,varargin)

%ODE45 Solve non-stiff differential equations, medium order method.

% [TOUT,YOUT] = ODE45(ODEFUN,TSPAN,Y0) with TSPAN = [T0 TFINAL] integrates

% the system of differential equations y' = f(t,y) from time T0 to TFINAL

% with initial conditions Y0. ODEFUN is a function handle. For a scalar T

% and a vector Y, ODEFUN(T,Y) must return a column vector corresponding

% to f(t,y). Each row in the solution array YOUT corresponds to a time

% returned in the column vector TOUT. To obtain solutions at specific

% times T0,T1,...,TFINAL (all increasing or all decreasing), use TSPAN =

% [T0 T1 ... TFINAL].

%

% [TOUT,YOUT] = ODE45(ODEFUN,TSPAN,Y0,OPTIONS) solves as above with default

% integration properties replaced by values in OPTIONS, an argument created

% with the ODESET function. See ODESET for details. Commonly used options

% are scalar relative error tolerance 'RelTol' (1e-3 by default) and vector

% of absolute error tolerances 'AbsTol' (all components 1e-6 by default).

% If certain components of the solution must be non-negative, use

% ODESET to set the 'NonNegative' property to the indices of these

% components.

%

% ODE45 can solve problems M(t,y)*y' = f(t,y) with mass matrix M that is

% nonsingular. Use ODESET to set the 'Mass' property to a function handle

% MASS if MASS(T,Y) returns the value of the mass matrix. If the mass matrix

% is constant, the matrix can be used as the value of the 'Mass' option. If

% the mass matrix does not depend on the state variable Y and the function

% MASS is to be called with one input argument T, set 'MStateDependence' to

% 'none'. ODE15S and ODE23T can solve problems with singular mass matrices


http://www.niftyadmin.cn/n/2145646.html

相关文章

sql oracle nvl,将多个列使用NVL – Oracle SQL

早安我心爱的sql向导和巫师,我想要在3个表中替换3列数据.目前我正在使用NVL功能,但这只限于两列.参见下面的例子:SELECT ccc.case_id,NVL (ccvl.descr,ccc.char)) char_valFROM case_char ccc,char_value ccvl,lookup_value lval1WHEREccvl.descr() ccc.valueAND c…

jdbc中PreparedStatement替换Statement实现CRUD与Blob类型的操作

1.PreparedStatement的理解: ① PreparedStatement 是Statement的子接口② An object that represents a precompiled SQL statement.③ 可以解决Statement的sql注入问题,拼串问题 PreparedStatement和Statement对比? Statement存在SQL注入…

创建RHEL-server-7.0操作系统

创建RHEL-server-7.0操作系统 1.双击进入VMware 2.点击创建虚拟机 3.点击自定义,然后点击下一步 4.选择12.0的版本,兼容性大。然后点击下一步 5.选择Linux(L).版本选择Red Had Eenterprise Liunx 7 64 位 点击下一步 6.选择稍后安…

oracle挑库发放次数,EBS OM发运状态 wsh_delivery_details.RELEASED_STATUS

wsh_delivery_details这个表用来存储记录销售订单的物料的发运明细信息,字段RELEASED_STATUS标识着该发运的状态,通常有值R,S,Y,C这几个状态。通过一脚本查下这个字段的含义:SELECT Lookup_Type,Lookup_Code,Meaning,Description,View_Applic…

Spring Cloud-鸿鹄Cloud分布式微服务云系统—组件化(三)

Spring Cloud集成项目有很多,下面我们列举一下和Spring Cloud相关的优秀项目,我们的企业架构中用到了很多的优秀项目,说白了,也是站在巨人的肩膀上去整合的。在学习Spring Cloud之前大家必须了解一下相关项目,希望可以…

ios json php null,PHP-在Android应用中获取jsonObject的Null值

我有从json对象获取值的问题.json_encode将空字符串返回给android.Logcat:05-01 22:36:21.653: D/Create Response(801): {}05-01 22:36:21.653: W/System.err(801): org.json.JSONException: No valuefor success05-01 22:36:21.663: W/System.err(801): atorg.jso…

KNN算法之图像处理一

KNN: 1.数据挖掘分类技术中最简单的方法之一。 2.也称为邻近算法,K最近邻分类算法 3.每个样本都可以用它最接近的k个邻居来代表 4.一般,距离使用欧式距离或曼哈顿距离(通常,k≤20) python代码实现 例子&…

oracle job 调用存过,Oracle Job 调用 PROCEDURE(存储过程)实例

Oracle Job 调用 PROCEDURE(存储过程)实例1.[代码]oracle_job_procedure.sql--一:相关主要查询--查询系统存储过程select name from user_source where typePROCEDURE;--查看job 二 中 步骤4 的25是 job字段值,每个人建立时可能不同select * from sys.us…