Solving Ordinary Differential Equations using Mass Matrix
1 回表示 (過去 30 日間)
古いコメントを表示
I am simulating a system of 14 ODEs in the form of mass matrix representation. I have a function that computes the mass matrix but my problem is that the simulation time takes forever because there are components of the matrix that demand a really large number of computations. The size of the mass matrix is 14x14 (total of 196 elements) and it contains only 56 nonzero elements and the 49 of them strongly depend on the states of the system of equations. In order to improve the execution time I thought that it would be better to pass the sparsity pattern option to the solver (MvPattern) along with the 'MStateDependence' option set to 'strong'. When passing these two options do I also have to pass the function handle which points to the function that computes the mass matrix or will the solver use approximations to numerically generate the mass matrix ? The mass matrix is definitely nonsigular so I also pass the 'MassSingular' ('no') option to the solver. I tried inverting the matrix to solve the equations but it really takes forever.
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!