フィルターのクリア

More than 580 billion possibilities

1 回表示 (過去 30 日間)
asim nadeem
asim nadeem 2019 年 9 月 6 日
コメント済み: asim nadeem 2019 年 9 月 8 日
Is it possible to check more than 580 billion possibilities in matlab without getting out of memory.

採用された回答

Matt J
Matt J 2019 年 9 月 6 日
編集済み: Matt J 2019 年 9 月 6 日
Sure, for example,
count=0;
for i=1:580*1e9
possibility=rand;
if possibility>0.5
count=count+1;
end
end

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 9 月 6 日
If you hold all of the possibilities in memory at the same time, and they take as little as 8 bytes each (that is, one double), then that would take over 4 1/4 terabytes. There are systems that can handle that much memory, so in theory you could do it, if you had the hardware.
There are some calculations that can be handled in "chunks" automatically by using "tall arrays"; see https://www.mathworks.com/help/matlab/tall-arrays.html
  1 件のコメント
asim nadeem
asim nadeem 2019 年 9 月 8 日
Thanks

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

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by