📄 test1.m
字号:
coder_input=[];
channel_input=[];
channel_output=[];
%for i=1:186;
% temp=rand;
% if temp<0.5
% coder_input(i)=0;
%else
% coder_input(i)=1;
%end
%end
coder_input=input('szj')
%coder_input=[1 1 0 0 1];
%(2,1,4)
G=[1 0 0 1 1;1 1 0 1 1];
%(6,1,4)
%G=[1 1 0 1 1;1 0 1 0 1;1 1 1 1 1;1 1 0 1 1;1 0 1 0 1;1 1 1 1 1];
k=1;
channel_output=viterbi_encoder(G,k,coder_input)
%[decoder_output,survivor_state,cumulated_metric]=viterbi_decoder(G,k,channel_output);
%if decoder_output==coder_input
% 'Ok'
%else
%'Error'
%end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -