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

📄 qam_bits2ab.m

📁 64QAM matlab s programs.
💻 M
字号:
function [a,b]=QAM_bits2ab(bit_stream)
%
% [a,b]=QAM_bits2ab(bit_stream)

% Make length a multiple of 4
L = length(bit_stream);
N = floor(L/4);
L2 = N*4;
bit_stream = bit_stream(1:L2);

BS = reshape(bit_stream,4,N);
BS1 = BS(1:2,:);
BS2 = BS(3:4,:);

for k = 1 : N
    
   % Split 4 bit word into two 2 bit words
   % and convert each to a a number from 0-3
   temp1 = BS1(:,k);
   num1 = temp1(1)*2+temp1(2);
   temp2 = BS2(:,k);
   num2 = temp2(1)*2+temp2(2);
   
   a(k) = (num1 - 1.5)/1.5;
   b(k) = (num2 - 1.5)/1.5;
    
end

⌨️ 快捷键说明

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