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

📄 a_input.m

📁 英文书《Digital Signal Processing with Examples in MATLAB》附带的MATLAB实例
💻 M
字号:
function [bit,jb]=a_input(y,jb,ipr);
% Function used by a_decode to pull one bit from y.
% bit  =bit pulled: 1 or 0.
% jb   =bit location in y - incremented and output as jb+1.
% ipr has the same effect here as in a_decode when =2.
iy=fix(jb/8)+1;
% Byte=0 if length of y is exceeded.
if iy>length(y),
	byte=0;
else
   byte=y(iy);
end
ybit=7-rem(jb,8);
bit=rem(fix(byte/2^ybit),2);
if ipr==2,
   fprintf('Pulled%2.0f at jbit=%7.0f\n',bit,jb);
end
jb=jb+1;

⌨️ 快捷键说明

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