high dimensional matrix takes too long to generate

3 visualizaciones (últimos 30 días)
savas yilmaz
savas yilmaz el 22 de Ag. de 2022
Comentada: Steven Lord el 22 de Ag. de 2022
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
savas yilmaz
savas yilmaz el 22 de Ag. de 2022
of course. I realized that creating this matrix is a bit difficult. however, although it is small in size, I learned to do this with a different command. thanks
Steven Lord
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
numColumns = 9.2609e+12
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))
theTime = 293.4675
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)
ans = datetime
10-Feb-2316 09:07:03

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by