bi2de.m
来自「详细的OFDM设计过程」· M 代码 · 共 18 行
M
18 行
function d = bi2de(b, varargin)
%BI2DE Convert binary vectors to decimal numbers.
% D = BI2DE(B) converts a binary vector B to a decimal value D. When B is a
% matrix, the conversion is performed row-wise and the output D is a column
% vector of decimal values. The default orientation of the binary input
% is Right-MSB; the first element in B represents the least significant bit.
%
% In addition to the input matrix, two optional parameters can be given:
%
% D = BI2DE(...,P) converts a base P vector to a decimal value.
%
% D = BI2DE(...,FLAG) uses FLAG to determine the input orientation. FLAG has
% two possible values, 'right-msb' and 'left-msb'. Giving a 'right-msb' FLAG
% does not change the function's default behavior. Giving a 'left-msb'
% FLAG flips the input orientation such that the MSB is on the left.
%
% Examples:
%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?