📄 nxt_stat.m
字号:
function [next_state,memory_contents]=nxt_stat(current_state,input,k)
%Next state matrix
%
% determine the next sate of each current state
%
% Arguments: current_state - decimal data
% input - input binary data: 0 or 1
% k - constraint length
% next_state - decimal data
% memory_contents: input data plus current state to
% determine the branch output
%Author: Hantao Liu
%
%==============================================================
%transfer the current_state to binary data
binary_state=deci2bin(current_state,k-1);
%determine the next state
next_state_binary=[input,binary_state(1:k-2)];
%transfer the next state to decimal data
next_state=bin2deci(next_state_binary);
%determine the memory contents
memory_contents=[input,binary_state];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -