high dimensional matrix takes too long to generate
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Steven Lord
el 22 de Ag. de 2022
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)
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!