Znn3bq.jpeg
汕头大学海洋科学接受调剂
查看: 2631  |  回复: 15
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

最怜宵舞

木虫 (正式写手)

[求助] ode45 已有4人参与

一道常微分求解的题目,要求用四阶龙格库塔法R-K,求Matlab中的ode45算法的内部算法程序代码,或者思路。

发自小木虫Android客户端
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

bluesine

铁杆木虫 (职业作家)

科苑小木虫

【答案】应助回帖

★ ★ ★ ★ ★
感谢参与,应助指数 +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
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 16 个回答

最怜宵舞

木虫 (正式写手)

有木有大神讲解一下参数的常微分方程组的龙格库塔的计算算法思路?

发自小木虫Android客户端
2楼2016-01-07 15:48:57
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ycsqubit

新虫 (著名写手)

3楼2016-01-07 15:57:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

最怜宵舞

木虫 (正式写手)

引用回帖:
3楼: Originally posted by ycsqubit at 2016-01-07 15:57:18
查书

找不到相关的我需要的内容

发自小木虫Android客户端
4楼2016-01-07 16:25:08
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 材料工程281还有调剂机会吗 +41 xaw. 2026-04-11 42/2100 2026-04-14 20:05 by honglizhao
[考研] 297,工科调剂?河南农业大学本科 +9 河南农业大学-能 2026-04-14 9/450 2026-04-14 16:03 by Art1977
[考研] 271求调剂 +35 2261744733 2026-04-11 41/2050 2026-04-14 15:36 by zs92450
[考研] 22专硕求调剂 +8 haoyun上岸 2026-04-11 10/500 2026-04-13 22:15 by zhq0425
[考研] 一志愿中南大学 0855 机械 286 求调剂 +11 不会吃肉 2026-04-12 11/550 2026-04-13 21:59 by bljnqdcc
[教师之家] 山东双非院校考核超级无底线,领导幸灾乐祸,教师遭殃恐 +3 qut2026 2026-04-11 7/350 2026-04-12 20:24 by qut2026
[考研] 291求调剂 +11 关忆北. 2026-04-09 12/600 2026-04-12 10:32 by 逆水乘风
[考研] 299求调剂 +8 ZVVZ13 2026-04-08 8/400 2026-04-12 00:40 by 蓝云思雨
[考研] 070300化学279求调剂 +19 哈哈哈^_^ 2026-04-08 20/1000 2026-04-11 20:43 by stoner78
[考研] 296求调剂 +14 汪!?! 2026-04-08 15/750 2026-04-11 20:28 by dongdian1
[考研] 352 求调剂 +6 yzion 2026-04-11 8/400 2026-04-11 16:24 by 明月此时有
[考研] 求调剂 +3 胃痉挛累了 2026-04-11 5/250 2026-04-11 14:13 by luhong1990
[考研] 085410-273求调剂 +6 X1999 2026-04-10 6/300 2026-04-11 10:32 by Delta2012
[考研] 工科273调剂 +6 X1999 2026-04-09 7/350 2026-04-11 10:23 by zhq0425
[考研] 346,工科0854求调剂,专硕 +7 moser233 2026-04-10 8/400 2026-04-11 08:52 by 猪会飞
[考研] 计算机类求调剂,22408-274分 +7 上岸de小虫 2026-04-09 8/400 2026-04-10 19:56 by fxue1114
[考研] 一志愿中科大070300化学,314分求调剂 +12 wakeluofu 2026-04-09 12/600 2026-04-10 09:57 by liuhuiying09
[考研] 337求调剂 +4 Gky09300550, 2026-04-09 4/200 2026-04-09 17:18 by 帕尔马拉特
[考研] 296求调剂 +3 汪!?! 2026-04-08 3/150 2026-04-08 22:00 by zhouyuwinner
[考研] 求调剂,现在还能填的 +3 上岸小莹加油 2026-04-08 3/150 2026-04-08 14:30 by zhq0425
信息提示
请填处理意见