フィルターのクリア

why does it take forever to generate some matrices in the Matlab gallery?

2 ビュー (過去 30 日間)
Viviana Arrigoni
Viviana Arrigoni 2019 年 1 月 28 日
コメント済み: Viviana Arrigoni 2019 年 2 月 1 日
I interrupted the execution of
gallery('randcorr',n)
and
A = gallery('toeppd',n,n,rand(n,1),rand(n,1));
for n = 10000 after almost one hour. I know my computer is not the fastest, but for other matrices in the gallery, it would take seconds.

採用された回答

Matt J
Matt J 2019 年 1 月 28 日
編集済み: Matt J 2019 年 1 月 28 日
Because some of the matrix types in the gallery are computationally expensive to construct. In particular, in
A = gallery('toeppd',n,n,rand(n,1),rand(n,1));
you are asking for the summation of 10000 matrices, where each matrix is itself 10000 x 10000. That is a lot of number crunching.
  1 件のコメント
Viviana Arrigoni
Viviana Arrigoni 2019 年 2 月 1 日
double clicked to Accepted and signed as Unaccepted by mistake. Seems like I can't undo that, sorry...

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by