⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 turbo_logmap.txt

📁 turbo码的matlab仿真源程序
💻 TXT
📖 第 1 页 / 共 4 页
字号:

     1    26

[code,t]
??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the 
 same number of rows.

[code;t]
??? Error using ==> vertcat
All rows in the bracketed expression must have the same 
number of columns.

[code t]
??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the 
 same number of rows.

[code t]
??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the 
 same number of rows.

[code t]
??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the 
 same number of rows.

[code;t]
??? Error using ==> vertcat
All rows in the bracketed expression must have the same 
number of columns.

[code;t]
??? Error using ==> vertcat
All rows in the bracketed expression must have the same 
number of columns.

[code,t]
??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the 
 same number of rows.

[code,t']

ans =

  Columns 1 through 13 

     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1
     0     0     0     1     1     1     1     1     1     1     0     0     1
     0     0     0     0     0     1     1     1     1     0     0     0     0
     0     0     1     1     0     1     1     1     1     0     0     0     0
     0     0     1     1     0     1     1     1     1     0     0     0     0
     0     1     1     0     1     1     1     1     0     0     0     0     0
     1     0     0     0     1     1     1     1     0     0     1     1     0
     1     0     0     0     1     1     1     1     0     0     1     1     0
     0     1     0     1     1     1     1     1     0     0     1     1     0
     0     1     1     1     0     1     1     0     0     0     1     1     0
     1     0     1     1     1     1     1     0     0     1     1     1     1
     1     0     1     1     1     1     1     0     0     1     1     1     1
     1     0     1     1     1     1     1     0     0     1     1     1     1
     0     1     0     0     0     1     1     0     0     0     0     0     0
     1     0     0     1     0     1     1     0     0     0     0     0     0
     1     0     0     1     0     1     1     0     0     0     0     0     0
     1     0     0     1     0     1     1     0     0     0     0     0     0
     0     1     1     0     1     1     1     0     0     1     1     1     1
     0     1     1     0     1     1     1     0     0     1     1     1     1
     0     1     1     0     1     1     1     0     0     1     1     1     1
     0     1     1     0     1     1     1     0     0     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1

  Columns 14 through 26 

     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     0     0     1
     1     1     1     1     1     1     1     1     1     0     0     0     0
     0     0     0     1     1     1     0     0     0     0     0     0     0
     0     0     0     1     1     1     0     0     0     0     0     0     0
     0     0     0     1     1     1     0     0     0     0     0     0     0
     0     0     0     1     1     1     0     0     0     0     1     1     0
     0     0     0     1     1     1     0     0     0     0     1     1     0
     0     0     0     1     1     1     0     0     0     0     1     1     0
     0     0     0     1     1     1     0     0     0     0     1     1     0
     0     0     0     0     0     0     0     0     0     1     1     1     1
     0     0     0     0     0     0     0     0     0     1     1     1     1
     0     0     0     0     0     0     0     0     0     1     1     1     1
     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     1     1     1     0     0     0     0     0     0     0
     0     0     0     1     1     1     0     0     0     0     0     0     0
     0     0     0     1     1     1     0     0     0     0     0     0     0
     0     0     0     1     1     1     0     0     0     1     1     1     1
     0     0     0     1     1     1     0     0     0     1     1     1     1
     0     0     0     1     1     1     0     0     0     1     1     1     1
     0     0     0     1     1     1     0     0     0     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1
     1     1     1     1     1     1     1     1     1     1     1     1     1

  Columns 27 through 32 

     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     0
     1     1     1     1     1     0
     1     1     1     1     1     0
     1     1     1     1     1     0
     0     1     1     1     1     1
     0     1     1     1     1     0
     0     1     1     1     1     0
     0     0     1     1     1     0
     0     0     1     1     1     1
     0     0     1     1     1     1
     0     0     1     1     1     1
     0     0     1     1     1     1
     0     0     1     1     1     0
     0     0     1     1     1     0
     0     0     1     1     1     0
     0     0     1     1     1     0
     0     0     1     1     1     1
     0     0     1     1     1     1
     0     0     1     1     1     1
     0     0     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1

size([code,t'])

ans =

    26    32

fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
symerr(code1,)
??? symerr(code1,)
                 |
Error: Expected a variable, function, or constant, found ")".

load aha.dat
symerr(code1,aha(1:26,:))

ans =

   306

symerr(code1(:,1:26),aha(1:26,1:26))

ans =

   249

symerr(ex,aha(1:26,1:26))

ans =

     0

symerr(ex,code1(:,1:26))

ans =

   249

26*26

ans =

   676

31-26

ans =

     5

symerr(ex,code1(:,6:31))

ans =

     0

fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
load aha.dat
symerr(ex,code1(:,1:26))

ans =

     0

symerr(aha(1:26,:),code1)

ans =

    36

5*26

ans =

   130

6*26

ans =

   156

fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
??? Reference to a cleared variable ex.

Error in ==> d:\MATLAB6p1\work\turbo\turbo.m
On line 18  ==> code = encode(ex,n,k,'hamming/binary',pol);

helpbrowser;
doc
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
??? Undefined function or variable 'ex'.

Error in ==> d:\MATLAB6p1\work\turbo\turbo.m
On line 18  ==> code = encode(ex,n,k,'hamming/binary',pol);

fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
??? Error using ==> encode
The matrix MSG in ENCODE must have K columns.

Error in ==> d:\MATLAB6p1\work\turbo\turbo.m
On line 18  ==> code = encode(ex15,n,k,'hamming/binary',pol);

turbo
??? Error using ==> encode
The matrix MSG in ENCODE must have K columns.

Error in ==> d:\MATLAB6p1\work\turbo\turbo.m
On line 18  ==> code = encode(ex15,n,k,'hamming/binary',pol);

fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
??? Error using ==> encode
The matrix MSG in ENCODE must have K columns.

Error in ==> d:\MATLAB6p1\work\turbo\turbo.m
On line 18  ==> code = encode(en15,n,k,'hamming/binary',pol);

fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
??? Error using ==> encode
The specified codeword length and message length are not valid.

Error in ==> d:\MATLAB6p1\work\turbo\turbo.m
On line 18  ==> code = encode(ex11,n,k,'hamming/binary',pol);

fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
load en11.dat
load en11.dat
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
symerr(en11(1:11,1:11),code1(:,1:11))

ans =

     0

symerr(en11(1:11,:),code1)

ans =

    22

t1=en(1:11,12:end);
??? Error: The end operator can only be used within an array index expression.

t1=en11(1:11,12:end);
t2=code1(:,12:end);
symerr(t1,t2)

ans =

    22

gfpretty(gfprimdf(m))
 
                                           4
                                  1 + X + X 
gfprimdf(m)

ans =

     1     1     0     0     1

m = 4; n = 2^m-1; % Codeword length = 15
k = 11; % Message length
% Create 100 messages, k bits each.
msg1 = randint(100*k,1,[0,1]); % As a column vector
msg2 = vec2mat(msg1,k); % As a k-column matrix
msg3 = bi2de(msg2); % As a column of decimal integers
% Create 100 codewords, n bits each.
code1 = encode(msg1,n,k,'hamming/binary');
code2 = encode(msg2,n,k,'hamming/binary');
code3 = encode(msg3,n,k,'hamming/decimal');
if ( vec2mat(code1,n)==code2 & de2bi(code3,n)==code2 )
   disp('All three formats produced the same content.')
end
All three formats produced the same content.
code1 = encode(ex11,n,k,'hamming/binary');
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
symerr(en11,code1)

ans =

    22

helpbrowser;
doc
m = 4; n = 2^m-1; % Codeword length = 15
k = 11; % Message length
% Create 100 messages, k bits each.
msg1 = randint(100*k,1,[0,1]); % As a column vector
msg2 = vec2mat(msg1,k); % As a k-column matrix
msg3 = bi2de(msg2); % As a column of decimal integers
% Create 100 codewords, n bits each.
code1 = encode(msg1,n,k,'hamming/binary');
code2 = encode(msg2,n,k,'hamming/binary');
code3 = encode(msg3,n,k,'hamming/decimal');
if ( vec2mat(code1,n)==code2 & de2bi(code3,n)==code2 )
   disp('All three formats produced the same content.')
end
All three formats produced the same content.
code2 = encode(ex11,n,k,'hamming/binary');
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
uiopen('d:\MATLAB6p1\work\turbo\turbo.m',1)
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
uiopen('d:\MATLAB6p1\work\turbo\saveDD.m',1)
fschange('d:\MATLAB6p1\work\turbo\saveDD.m');
clear savedd
tt=1:100;
saveDD('l',tt)
Warning: Input must be a string.
> In D:\MATLAB6p1\toolbox\matlab\strfun\deblank.m at line 18
  In D:\MATLAB6p1\toolbox\matlab\strfun\strcat.m at line 60
  In d:\MATLAB6p1\work\turbo\saveDD.m at line 8
??? Error using ==> fprintf
Invalid fid.

Error in ==> d:\MATLAB6p1\work\turbo\saveDD.m
On line 19  ==>     else  fprintf(fid,'%d ',value(i));

saveDD(tt,'l')
uiopen('d:\MATLAB6p1\work\turbo\saveDD.m',1)
fschange('d:\MATLAB6p1\work\turbo\saveDD.m');
clear savedd
saveDD(tt,'l')
uiopen('d:\MATLAB6p1\work\turbo\saveDD.m',1)
fschange('d:\MATLAB6p1\work\turbo\saveDD.m');
clear savedd
tt=zeros(11,11);
uisave
tt

tt =

     1     0     0     0     0     0     0     0     0     0     0
     0     1     0     0     0     0     0     0     0     0     0
     0     0     1     0     0     0     0     0     0     0     0
     0     0     0     1     0     0     0     0     0     0     0
     0     0     0     0     1     0     0     0     0     0     0
     0     0     0     0     0     1     0     0     0     0     0
     0     0     0     0     0     0     1     0     0     0     0
     0     0     0     0     0     0     0     1     0     0     0
     0     0     0     0     0     0     0     0     1     0     0
     0     0     0     0     0     0     0     0     0     1     0
     0     0     0     0     0     0     0     0     0     0     1

saveDD(tt,'l')
saveDD(tt(:),'l')
uiopen('d:\MATLAB6p1\work\turbo\turbo.m',1)
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
fschange('d:\MATLAB6p1\work\turbo\turbo.m');
clear turbo
turbo
quit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -