Skip to content

Runge Kutta numerical integration method in C++, 较为通用性的龙格库塔四阶五步积分(固定步长)

License

Notifications You must be signed in to change notification settings

hgpvision/RungeKutta45

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RungeKutta45

Runge Kutta numerical integration method in C++, 较为通用性的龙格库塔四阶五步积分(固定步长)

使用

编写一阶微分方程头文件以及主函数即可(本程序不能做到变步长,旨在规范化函数接口,即只需编写一阶微分方程与主函数,积分部分不用做任何改动,另外需要依赖Eigen3)

示例

求解以下微分方程:

dy = 10 * x * (1 - y)

y(0) = 0

步长h = 0.05, 并与解析解y = 1 - exp(-5 * x * x)比较。

编写一阶微分方程如DynamicModel.h,编写主函数如main_test.cpp

About

Runge Kutta numerical integration method in C++, 较为通用性的龙格库塔四阶五步积分(固定步长)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages