Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Is there a way for MatLab to compute random numbers for a range of numbers?

1 回表示 (過去 30 日間)
George Carlisle
George Carlisle 2015 年 10 月 1 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a set of numbers but I need to compute all combinations of them and put them in a spreadsheet. Can Mathlab help me with this?
  4 件のコメント
George Carlisle
George Carlisle 2015 年 10 月 1 日
編集済み: George Carlisle 2015 年 10 月 1 日
Here's an example of what I mean.
I have 0123.
I need mathlab to create this:
0123, 1230, 2301, 3012, etc.
Mohammad Abouali
Mohammad Abouali 2015 年 10 月 1 日
編集済み: Mohammad Abouali 2015 年 10 月 1 日
Let's say you generate all the 20^100 numbers; Where do you want to store it? Let's say you need only 1Byte for each number (which definitely you gonna need more; but let's just ignore this), then you gonna need 1.1259e+115 PetaBytes of storage to store all of them. Something tells me even with all the computers combined, you won't have that much of storage.

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 10 月 1 日
No. 20^100 exceeds the estimated number of elementary particles in the Universe. You would need to be able to somehow inscribe at least 10^45 different values on each elementary particle in order to store 20^100 lists of numbers. This cannot be done.
  5 件のコメント
George Carlisle
George Carlisle 2015 年 10 月 1 日
編集済み: George Carlisle 2015 年 10 月 1 日
The books says no more then 10 but it wouldn't accept that many numbers/letters but my bigger question is how do I get MatLab to accept the long set? Do I need to setup a custom cluster for this? Does the educational edition have limits?
George Carlisle
George Carlisle 2015 年 10 月 1 日
If any of you have the full edition, can you run this and export it to excel and post here. Thanks.

the cyclist
the cyclist 2015 年 10 月 1 日
It sounds like you might want the perms command. If that is not quite what you need, you might click on some of the "See Also" commands listed at the bottom of that page.
  3 件のコメント
George Carlisle
George Carlisle 2015 年 10 月 1 日
This is working but I have to tweak it, > v = ['gapvilfmsctnqywdekrh']; p=perms(v) Error using perms (line 23) Maximum variable size allowed by the program is exceeded.
George Carlisle
George Carlisle 2015 年 10 月 1 日
編集済み: George Carlisle 2015 年 10 月 1 日
I did 9 characters and it gave me this, Your solution should use the matrix multiplication operator (*).

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by