"Maximum variable size allowed by the program is exceeded." When using the syndtable command

I've been working on some Hamming codes recently. Then I got my H matrix which is a 64x72 matrix and i want to make a decoding table (syndrome table) using the command "syndtable(H)"
every time i do that command i get the error:
t = syndtable(H4) ??? Error using ==> zeros Maximum variable size allowed by the program is exceeded.
Error in ==> syndtable at 28 table = zeros(2^n_k,n);
Anyone know what am I doing wrong ?

댓글 수: 1

What is are the values of n_k and n? It is easy to make 2^n_k of astronomical size for large n_k.

댓글을 달려면 로그인하십시오.

 채택된 답변

Friedrich
Friedrich 2013년 5월 10일
편집: Friedrich 2013년 5월 10일
Hi,
n_k is 64 so
>>2^n_k
ans =
1.8447e+19
and n is 72. The code calls zeros(2^n_k,n) which would requiere a total amount of elements:
>> (2^n_k)*n
ans =
1.3282e+21
However the maximum amount of elements in any array/matrix is:
[~,max_elements] = computer
max_elements =
2.8147e+14
which is lower than the amount you requested. So you get the error you are facing.
In addition, if that limit wouldn't exist you would need a huge amount of memory in order to store that double matrix:
>>(1.3282e+21)*8/1024^4
ans =
9.6639e+09
So 9.6e+09 TB of memory.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Error Detection and Correction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by