Enormous array of zeros exceeds maximum array size preference.
11 ビュー (過去 30 日間)
古いコメントを表示
Hamid Rhezouani
2021 年 11 月 21 日
コメント済み: Hamid Rhezouani
2021 年 11 月 22 日
I would like to create an 99x19x99x19x99x19x99x19 array of zeros. I have tried zeros(99,19,99,19,99,19,99,19), but I got the following error:
"Requested 99x19x99x19x99x19x99x19 (93270.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive."
The reason for trying to create such a large matrix is that I want to construct a Markov transition matrix for a Markov chain with a finite state space of 4-dimensional vectors. This transition matrix will be very sparse (there will be only four or five positive transition probabilities for each "starting point" (x1,x2,x3,x4)). I may use reshape to turn the created 8-dimensional array into a matrix.
Unfortunately, I do not know all the ins and outs of MATLAB. Does someone know some method to get around this memory issue?
0 件のコメント
採用された回答
Walter Roberson
2021 年 11 月 21 日
https://www.mathworks.com/matlabcentral/fileexchange/29832-n-dimensional-sparse-arrays
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Markov Chain Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!