Handle with overflowing memory in matlab -
Handle with overflowing memory in matlab -
i have problem overflowing memory in matlab. working in channel coding using ludy code. encoding symbol y
created following
y=x*g
where g
matrix n-by-m , x
input symbol size 1-by-n
my problem want work number of input symbols large. hence, must allocate g matrix size large. however, occurs overflow memory problem. using matlab 2012a it. suggest me method resolve problem
for illustration g
matrix 40000-by-60000 code
function g = gen_matrix(n,m) g = zeros(n,m); i=1:m d=randi(n/2); column = [ones(1,d) zeros(1,n-d)]; column = column(randperm(n)); g(:,i) = column'; end end
this memory information
[userview systemview] = memory; systemview.virtualaddressspace ans = available: 1.4074e+14 total: 1.4074e+14
try using sparse
matrix:
function g = gen_matrix(n,m) g = sparse(zeros(n,m)); i=1:m d=randi(n/2); column = [ones(1,d) sparse(zeros(1,n-d))]; column = column(randperm(n)); g(:,i) = column'; end end
matlab memory-management encoding
Comments
Post a Comment