Borrar filtros
Borrar filtros

problem with parfor and big sparse matrix

1 visualización (últimos 30 días)
freebil
freebil el 6 de Nov. de 2013
Editada: freebil el 6 de Nov. de 2013
I have the following code but I have to run it for n>10^6. For n=10^5 the memory is over. I have 16gb. Is there any efficient way to do this?
n = 10^6;
m = n/2;
H = sparse(m,n);
parfor jj=1:n
pos = sample(cumulative);
H(:,jj) = (rand(m,1) > 1 - degrees(pos)/m)+0.0;
end

Respuestas (0)

Categorías

Más información sobre Parallel for-Loops (parfor) 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