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

📄 qam_slicer.m

📁 这是一个完整的数据传输过程的matlab例程!
💻 M
字号:
function y = QAM_Slicer(Y,Nbits,opt);% y = QAM_Slicer(Y,Nbits);%% Slices a QAM signal with Nbits resolution of both I and Q% components. %% Input parameters:%     Y       complex input (scalar or vector)%     Nbits   resolution of real and imag part of Y%     opt     opt='norm' sets re-normlaisation to unit variance%% Output parameters:%     y       2*2^Nbit QAM symbol   Ly = length(Y);Levels = 2^Nbits;% rescalingScale = [0.7071;   1.5811;   3.2404;   6.5192];Y = Y*Scale(Nbits);% **** decision slicer ****i = round(real(Y)+(Levels-1)/2);i(i<0) = 0;i(i>(Levels-1)) = Levels-1;q = round(imag(Y)+(Levels-1)/2);q(q<0) = 0;q(q>(Levels-1)) = Levels-1;% restore QAM symboly = i-(Levels-1)/2 + sqrt(-1)*(q-(Levels-1)/2);if exist('opt'),   if opt=='renorm',       y = y/Scale(Nbits);   end;end;

⌨️ 快捷键说明

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