Out of Memory Error
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, this is my first post so i'll try to provide as much info as possible, sorry if I seem really simple or condescending that's really not my intention.. I just don't want to miss out anything!
I recently ran this code (its borrowed and slightly edited for my use, so I presume it's looping unnecessarily) and after about 6 hours of running it, it printed an out of memory error. So anyway, the idea is it creates a randomly generated small world network with the same properties of the one I'm investigating.. I only need the average C(i) and average L(i) of the network so any advice would be great! A few of the functions come from the Brain Connectivity Toolbox (https://sites.google.com/site/bctnet/)
clear
n = 6927; k = 3;
p = [0:0.0002:0.001,0.002,0.006,0.01,0.05,0.1:0.3:1];
m = length(p);
L = zeros(m,1); C = zeros(m,1);
Lat = smallw(n,k,0);
L0 = mean(mean(distance_bin(Lat)));
C0 = mean(clustering_coef_bu(Lat));
for i=1:m
for j=1:10
A = rewire(Lat,p(i));
L(i) = L(i) + mean(mean(distance_bin(A)));
C(i) = C(i) + mean(clustering_coef_bu(A));
end
L(i) = mean(L(i)/10);
C(i) =(C(i)/10);
end
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!