필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by