how to solve the problem of "out of memory"?

1 次查看(过去 30 天)
i have the following code to calculate matrix s
for i = 1:n
for j = 1:i % <-- Note the 1:i instead of 1:n
s(i,j) = (DL(i,IDX(j))*DL(j,IDX(i))) / norm(DL(i,IDX(j))) * norm(DL(j,IDX(i)));
s(j,i) = s(i,j);
end
end
where the input for this code is matrix (5000 x 5000) i.e i= 1:5000 and also j, and each time calculate s(i,j) from mentioned equation that depend on DL (vector 5000 x 2), but when i run this code the program give me error " out of memory"

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Cell Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by