フィルターのクリア

Different performance using mldivide, how to speed up my application?

3 ビュー (過去 30 日間)
Elisavet Chatzizyrli
Elisavet Chatzizyrli 2016 年 1 月 15 日
I use mldivide to solve a system's equation, eg fsol = kk \ fn. Depending on how I form the system's matrix,kk, I have a change in mldivide performance.
My code adresses fem analysis. kk is a sparse matrix. When I use kk(nd,nd) = kk(nd,nd) + k, where nd is 1x4 matrix, it is slower to form the kk matrix, but for some reason the fsol = kk \ fn runs much faster, than the case I use separate matrices to store the indices and values and form the kk matrix as kk= sparse(I,J,val).
It probably has something to do with memory allocation, but I have no idea how to solve the problem. Could someone give me some insight as to how to control the overall process?
Thank you.
  2 件のコメント
Walter Roberson
Walter Roberson 2016 年 1 月 15 日
If nd is 1x4 then kd(nd,nd) would be addressing 16 locations, not 4 locations. Is that your intention?
Elisavet Chatzizyrli
Elisavet Chatzizyrli 2016 年 3 月 8 日
Yes, that is my intention.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by