Computational speed when the array dimension is large

조회 수: 7 (최근 30일)
Shujie Zhao
Shujie Zhao 2021년 11월 15일
댓글: James Tursa 2021년 11월 15일
The 4th-order Runge-Kutta numerical method is applied to drive the time-domain responses of a second order differential equation, where the unknown motion is a function of time. I find that the speed of the operation drops dramatically when my simulation time becomes longer. How can I improve the speed of the program? I compared calculation speed between 200s and 7200s simulation time and the drop in running speed was noticeable. The length of all variables are pre-defined before the loop.The simulated time step is 0.01s, and the computer processor is "Intel Xeon W-2295, 18 Cores, 36 Threads, 3.0GHz, 4.8GHz Turbo" and the memory is 64GB (4*16GB) DDR4-2933 REG ECC.
  댓글 수: 1
James Tursa
James Tursa 2021년 11월 15일
Please post the differential equation you are solving and the code you are using. It is very hard to suggest improvements without seeing these details.

댓글을 달려면 로그인하십시오.

답변 (1개)

Steven Lord
Steven Lord 2021년 11월 15일
Have you tried a stiffer solver? See this post on Cleve Moler's blog for more information about stiffness.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by