function y = qammod(x,M, varargin)
%QAMMOD Quadrature amplitude modulation
% error checks
if(nargin>3)
error('comm:qammod:numarg','Too many input arguments.');
end
%Check x, ini_phase
if ( ~isreal(x) || any(any(ceil(x)~=x)) || ~isnumeric(x) )
error('comm:qammod:xreal','Elements of input X must be integers in [0, M-1].');
end
if(~isreal(M) || ~isscalar(M) || M<=0 || (ceil(M)~=M) || ~isnumeric(M) )
error('comm:qammod:Mreal','M must be a positive integer.');
end
if( ~isnumeric(M) || ceil(log2(M)) ~= log2(M))
error('comm:qammod:Mpow2','M must be in the form of M = 2^K, where K is an integer. ');
end
% check that X are all integers within range.
if (min(min(x)) < 0) || (max(max(x)) > (M-1))
error('comm:qammod:xreal','Elements of input X must be integers in [0, M-1].');
end
if(nargin==3)
ini_phase = varargin{1};
if(isempty(ini_phase))
ini_phase = 0;
elseif(~isreal(ini_phase) || ~isscalar(ini_phase) )
error('comm:qammod:ini_phaseReal','INI_PHASE must be a real scalar.');
end
else
ini_phase = 0;
end
const = squareqamconst(M,ini_phase);
y = genqammod(x,const);
% --- EOF --- %
QAM.rar_matlab q_matlab qam_modulation_qam_调制程序 matlab
版权申诉
24 浏览量
2022-09-21
04:20:27
上传
评论
收藏 900B RAR 举报
小波思基
- 粉丝: 70
- 资源: 1万+
最新资源
- Screenshot_20240430_144340_com.ss.android.ugc.live.jpg
- 回到山沟沟.mp3
- 基于matlab实现自适应波束形成RLS及LMS算法仿真源程序1.rar
- 基于matlab实现自己编写的基于卡尔曼滤波的利用加速度传感器的计步器,测试数据是传感器放在腰部和手臂 .rar
- 基于matlab实现阵列信号处理,波束形成.rar
- 111111111111111111
- 基于matlab实现计步器编程;对当前的计步器装置的数值算法模拟 .rar
- Mdb学习查看PW;access;mdb;pw;password;patch
- 基于matlab实现关于语音信号声源定位DOA估计所用的一些传统算法.rar
- 基于ultralytics-yolov8, 将其检测/分类/分割/姿态等任务移植到rk3588上
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈