登录
首页 » Windows开发 » function [tout, yout] = rk4 (ypfun. tspan, y0, h)% fixed step four

function [tout, yout] = rk4 (ypfun. tspan, y0, h)% fixed step four

于 2023-01-15 发布 文件大小:1.31 kB
0 36
下载积分: 2 下载次数: 1

代码说明:

function [tout, yout] = rk4(ypfun, tspan, y0, h) %定步长四阶Runge-Kutta法求常微分方程(组)数值解 %[tout,yout] = rk4( ypfun , tspan, y0,h) % 这里字符串ypfun是用以表示f(t, y)的M文件名, % tspan=[t0, tfinal]表示自变量初值t0和终值tf % y0表示初值向量y0,h是步长。 % 输出列向量tout表示节点 (t0 , t1 , … , tn) % 输出矩阵yout 表示数值解,每一列对应y的一个分量-function [tout, yout] = rk4 (ypfun. tspan, y0, h)% fixed step four-stage Runge- Kutta method for ordinary differential equations (Group) numerical solution% [tout. yout] = rk4 (ypfun, tspan, y0, h)% string ypfun here is used to indicate that f (t, y) M name, tspan% = [t0. tfinal] said variable initial and final t0 tf% y0 said initial vector y0, h is a step. % Output column vector tout said Node (t0, t1, ..., tn)% output matrix yout said numerical solution, each y counterparts out of a weight

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696524资源总数
  • 103939会员总数
  • 12今日下载