Creating a matrix-differential equation from C file
4 次查看(过去 30 天)
显示 更早的评论
I have a set of differential equations in C(created from a tool that takes an xml input), in the following form
#ifdef ODEs
dx[0] = Function1(p[67], p[64], p[66], p[65], p[23], x_c[0], x_c[3], p[49]);//
dx[1] = Function2(p[62], p[64], p[66], p[65], p[23], x_c[1], x_c[3], p[40]);//
#endif /* ODEs */
I'm trying to solve a matrix differential equation of the form X' = F(X) + B, in MATLAB. From the above sample code what I have is the content for X' = F(X).
I have created the B matrix in MATLAB. I'm using MinGW in MATLAB to integrate the C code with MATLAB.
I'm facing challenge in converting the set of ODE's in C to a matrix-differential equation form(X' = F(X)), which I can use in MATLAB. Is it possible to import the ODE's from C file and build the matrix within MATLAB?
I would like to ask for suggestions on how this can be done.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!