mbin_state.m
来自「OFDMA 物理层开发的matlab 源码.飞思卡尔提供.对物理层开发的工程师有」· M 代码 · 共 29 行
M
29 行
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: mBin_state.m.rca $
% $Revision: 1.1 $
% $Date: Mon Jan 22 10:28:18 2007 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Decrease length of computation (use of the library function dec2bin)
%
% bin_state = mBin_state( int_state, m ) converts an vector
% of integer into a binary matrix; the i-th row is the binary
% form of m bits for the i-th integer;
% For example, bin_state (3,2)-->1 1
%
% Output:
% bin_state => the converted matrix
% Inputs:
% int_state => the vector of integer need to be converted
% m => the binary representation with at least m bits.
function bin_state = mBin_state( int_state, m )
bin_state = rem(floor(int_state.*pow2(1-m:0)),2);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?