high dimensional matrix takes too long to generate
조회 수: 3 (최근 30일)
이전 댓글 표시
I have two matrices. A(3x226981), B(3x40800501).
I want to do the following process. but it takes too long.
I used parfor but it's still too long. is there a simple way?
for x=1:length(B)
for y=1:length(A)
P= [B(:,x);A(:,y)]
TOP=[TOP P]
end
end
댓글 수: 8
Steven Lord
2022년 8월 22일
Your machine almost certainly doesn't have enough memory to store that data, and even if you could processing the combinations brute-force would take a very, very long time.
numColumns = 226981*40800501
Let's say you could process a thousand columns per second. How long would it take to process that data?
theTime = years(seconds(numColumns/1000))
I don't think you want to wait for almost 300 years for your answer.
If you explain what problem you're hoping to use this enormous matrix to solve, we may be able to offer a solution that won't make you wait until sometime in 2316 for the answer.
datetime('now') + seconds(numColumns/1000)
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!