untitled.asv

来自「this file consists of many matlab progra」· ASV 代码 · 共 31 行

ASV
31
字号
%%linear block coder%%
%%encoder section%%
n=input('enter the value of n')
k=input('enter the value of k')
q=n-k;
disp('the parity check matrix is of dimension')
disp(q)
disp('x')
disp(n)
h=input('enter the parity check matrix of the given dimension')
h1(1:q,1:n)=0;
if size(h)~=size(h1)
    disp('invalid check matrix')
else
    a=eye(q);
    h2(1:q,1:k)=0;
    b=horzcat(h2,a);
    c=h-b;
    c(:,k+1:end)=[];
    p1(:,:)=c;
    disp('the pa
    p=(p1)'
    d=eye(k);
    disp('the generator matrix is')
    g=horzcat(d,p)
end
%%decoder section%%
disp('no. of message bits:')
disp(k)
m=input('enter the message bits')

⌨️ 快捷键说明

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