what is the maximum dimension size we can generate by rand function?
4 ビュー (過去 30 日間)
古いコメントを表示
as i want generate random matrices using rand fun eg. rand(m,n) what is maximum size of m & n i can use?
0 件のコメント
回答 (2 件)
Azzi Abdelmalek
2016 年 7 月 19 日
編集済み: Azzi Abdelmalek
2016 年 7 月 19 日
Type
memory
you will get Maximum possible array
a=rand
whos a
Name Size Bytes Class Attributes
a 1x1 8 double
this indicate that a is 8 bytes. you can deduce the maximum size of your array
1 件のコメント
Guillaume
2016 年 7 月 19 日
Yes, the maximum array size (generated by rand or any other way) is limited by your computer memory.
If you're using a 64-bit version of matlab, an array of the maximum possible size would probably take a loooong time to generate and do any operation with.
Steven Lord
2016 年 7 月 19 日
There's a theoretical limit that you're only likely to hit if you're using an older 32-bit version of MATLAB. This is given by the second output of the computer function. [If you're on a 64-bit machine, I feel very confident saying you don't have a machine with enough memory to create a matrix that size. I think you'd need somewhere in the hundreds or thousands of terabytes.]
There's a practical limit given by the amount of memory available to MATLAB. This can be somewhat controlled by having other applications open or (if you're using release R2015a or later) via the Array Size Limit preference in the Workspace Browser section of the Preferences for MATLAB.
And then there's the limit of how many random numbers you need for your particular application.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!