Out of Memory Error

1 回表示 (過去 30 日間)
Alex Parkins
Alex Parkins 2014 年 4 月 14 日
編集済み: Alex Parkins 2014 年 4 月 14 日
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 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by