フィルターのクリア

Common errors which increases the computation time

2 ビュー (過去 30 日間)
revathy M
revathy M 2017 年 10 月 3 日
回答済み: Jan 2017 年 10 月 3 日
Hi!I'm working on a Fluid dynamics problem.Have written the code for solving block tridiagonal matrix.Have used finite difference method in the calculation.It takes hours to execute.What are the common mistakes which increases the computation time ?

回答 (1 件)

Jan
Jan 2017 年 10 月 3 日
It would not be efficient to post a list of all possible problems. Better post the relevant part of your code.
Find the bottleneck of the code with the profile command. Sometimes is is a simple disp() command, which displays the progress. Or maybe a forgotten pre-allocation, or repeated calculations of the expensive functions like exp() or power() with the same inputs.

カテゴリ

Help Center および File ExchangeFluid Dynamics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by