| 查看: 2530 | 回复: 15 | |||
最怜宵舞木虫 (正式写手)
|
[求助]
ode45 已有4人参与
|
|
一道常微分求解的题目,要求用四阶龙格库塔法R-K,求Matlab中的ode45算法的内部算法程序代码,或者思路。 发自小木虫Android客户端 |
» 猜你喜欢
依托企业入选了国家启明计划青年人才。有无高校可以引进的。
已经有13人回复
AI 太可怕了,写基金时,提出想法,直接生成的文字比自己想得深远,还有科学性
已经有11人回复
表哥与省会女结婚,父母去帮带孩子被省会女气回家生重病了
已经有9人回复
同年申请2项不同项目,第1个项目里不写第2个项目的信息,可以吗
已经有10人回复
依托企业入选了国家启明计划青年人才。有无高校可以引进的。
已经有11人回复
最怜宵舞
木虫 (正式写手)
- 应助: 1 (幼儿园)
- 金币: 1711.4
- 散金: 114
- 红花: 16
- 沙发: 6
- 帖子: 420
- 在线: 24小时
- 虫号: 4171587
- 注册: 2015-10-25
- 性别: MM
- 专业: 计算数学与科学工程计算
2楼2016-01-07 15:48:57
3楼2016-01-07 15:57:18
最怜宵舞
木虫 (正式写手)
- 应助: 1 (幼儿园)
- 金币: 1711.4
- 散金: 114
- 红花: 16
- 沙发: 6
- 帖子: 420
- 在线: 24小时
- 虫号: 4171587
- 注册: 2015-10-25
- 性别: MM
- 专业: 计算数学与科学工程计算
4楼2016-01-07 16:25:08
明明棒棒仔
铁杆木虫 (职业作家)
- 应助: 0 (幼儿园)
- 金币: 9252.9
- 散金: 4414
- 红花: 8
- 沙发: 1
- 帖子: 3179
- 在线: 578.4小时
- 虫号: 2128932
- 注册: 2012-11-15
- 专业: 计算机网络
5楼2016-01-07 16:51:36
bluesine
铁杆木虫 (职业作家)
科苑小木虫
- 数学EPI: 5
- 应助: 132 (高中生)
- 贵宾: 1.991
- 金币: 9765.3
- 散金: 89
- 红花: 19
- 帖子: 3600
- 在线: 377小时
- 虫号: 869544
- 注册: 2009-10-12
- 性别: GG
- 专业: 数学物理
【答案】应助回帖
★ ★ ★ ★ ★
感谢参与,应助指数 +1
最怜宵舞: 金币+5, ★有帮助 2016-01-07 17:43:17
感谢参与,应助指数 +1
最怜宵舞: 金币+5, ★有帮助 2016-01-07 17:43:17
ode45Matlab自带了,你还确定继续自己写??![]() help ode45 ODE45 Solve non-stiff differential equations, medium order method. [T,Y] = 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. Function ODEFUN(T,Y) must return a column vector corresponding to f(t,y). Each row in the solution array Y corresponds to a time returned in the column vector T. To obtain solutions at specific times T0,T1,...,TFINAL (all increasing or all decreasing), use TSPAN = [T0 T1 ... TFINAL]. [T,Y] = 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). [T,Y] = ODE45(ODEFUN,TSPAN,Y0,OPTIONS,P1,P2...) passes the additional parameters P1,P2,... to the ODE function as ODEFUN(T,Y,P1,P2...), and to all functions specified in OPTIONS. Use OPTIONS = [] as a place holder if no options are set. 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 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. [T,Y,TE,YE,IE] = ODE45(ODEFUN,TSPAN,Y0,OPTIONS...) with the 'Events' property in OPTIONS set to a function EVENTS, solves as above while also finding where functions of (T,Y), called event functions, are zero. For each function you specify whether the integration is to terminate at a zero and whether the direction of the zero crossing matters. These are the three vectors returned by EVENTS: [VALUE,ISTERMINAL,DIRECTION] = EVENTS(T,Y). For the I-th event function: VALUE(I) is the value of the function, ISTERMINAL(I)=1 if the integration is to terminate at a zero of this event function and 0 otherwise. DIRECTION(I)=0 if all zeros are to be computed (the default), +1 if only zeros where the event function is increasing, and -1 if only zeros where the event function is decreasing. Output TE is a column vector of times at which events occur. Rows of YE are the corresponding solutions, and indices in vector IE specify which event occurred. SOL = ODE45(ODEFUN,[T0 TFINAL],Y0...) returns a structure that can be used with DEVAL to evaluate the solution or its first derivative at any point between T0 and TFINAL. The steps chosen by ODE45 are returned in a row vector SOL.x. For each I, the column SOL.y(:,I) contains the solution at SOL.x(I). If events were detected, SOL.xe is a row vector of points at which events occurred. Columns of SOL.ye are the corresponding solutions, and indices in vector SOL.ie specify which event occurred. Example [t,y]=ode45(@vdp1,[0 20],[2 0]); plot(t,y(:,1)); solves the system y' = vdp1(t,y), using the default relative error tolerance 1e-3 and the default absolute tolerance of 1e-6 for each component, and plots the first component of the solution. Class support for inputs TSPAN, Y0, and the result of ODEFUN(T,Y): float: double, single See also other ode solvers: ode23, ode113, ode15s, ode23s, ode23t, ode23tb options handling: odeset, odeget output functions: odeplot, odephas2, odephas3, odeprint evaluating solution: deval ode examples: rigidode, ballode, orbitode NOTE: The interpretation of the first input argument of the ODE solvers and some properties available through ODESET have changed in this version of MATLAB. Although we still support the v5 syntax, any new functionality is available only with the new syntax. To see the v5 help, type in the command line more on, type ode45, more off Reference page in Help browser doc ode45 |

6楼2016-01-07 17:17:35
最怜宵舞
木虫 (正式写手)
- 应助: 1 (幼儿园)
- 金币: 1711.4
- 散金: 114
- 红花: 16
- 沙发: 6
- 帖子: 420
- 在线: 24小时
- 虫号: 4171587
- 注册: 2015-10-25
- 性别: MM
- 专业: 计算数学与科学工程计算
7楼2016-01-07 17:42:59
最怜宵舞
木虫 (正式写手)
- 应助: 1 (幼儿园)
- 金币: 1711.4
- 散金: 114
- 红花: 16
- 沙发: 6
- 帖子: 420
- 在线: 24小时
- 虫号: 4171587
- 注册: 2015-10-25
- 性别: MM
- 专业: 计算数学与科学工程计算
8楼2016-01-07 17:44:17
【答案】应助回帖
★ ★ ★ ★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
最怜宵舞: 金币+10, ★★★很有帮助 2016-01-07 22:47:40
感谢参与,应助指数 +1
最怜宵舞: 金币+10, ★★★很有帮助 2016-01-07 22:47:40
|
Dormand, J.R, and Prince, P.J. 1980, “A Family of Embedded Runge-Kutta Formulae,” Journal of Computational and Applied Mathematics, vol. 6, pp. 19–26. ode45,嵌入式RK方法,单步计算一套数据,却可以组合出5阶和4阶的公式,这样就可以单步估计误差,自适应由此产生。原理相对简单,关键是对步长的控制 |

9楼2016-01-07 20:17:05
最怜宵舞
木虫 (正式写手)
- 应助: 1 (幼儿园)
- 金币: 1711.4
- 散金: 114
- 红花: 16
- 沙发: 6
- 帖子: 420
- 在线: 24小时
- 虫号: 4171587
- 注册: 2015-10-25
- 性别: MM
- 专业: 计算数学与科学工程计算
10楼2016-01-07 22:46:06













回复此楼
