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

📄 qamdet.asv

📁 16QAM的MATLAB调制解调仿真
💻 ASV
字号:
function[xn,x]=qamdet(y,fs,fb,fc);
%
%
%   Usage:[y, fs, fb, fc]=qamdet(y,fs,fb,fc);BBI2000
if nargin<4,fc=2;end;
if nargin<3;fb=1;end;
if nargin<2,fs=32;end;
if nargin<1;y=qam([1 1 0 0 1 1 1 1 0 0 0 0 0 0 1 1]);end;
dt=1/fs;t=0:dt(length(y)-1)*dt;
I=y.*cos(2*pi*fc*t); Q=-y.*sin(2*pi*fc*t);
[b,a]=butter(2,2*fb/fs);tstr='16QAM';
I=filtfilt(b,a,I);Q=filtfilt(b,a,Q);
plot(i,I,i,Q);
m=4*fs/fb;N=length(y)/m;n=(.6:1:N) *m;n=fix(n);
In=I (n);Qn=Q (n);xn=four2two ([In Qn]);
nn=length(xn);xn=[xn(1:nn/2);xn(nn/2+1:nn)];
xn=xn(:); xn=xn'; x=[I; Q];
%---------------------------------
if nargout<1;
   c='bbbbbbbbrrrrrrrr';
   subplot(211);plot(t,y);title(' Input');
   subplot(212);plot(t,x);set(gca,' ygrid',' on'); v=axis;
   for i=1: 4*N
       ci=rem(i, 16);ci=ci+(ci==0) *16;ci=c(ci);
       text((2*i-1) *m*dt/8,v(4) *.8,int2str(xn(i)),'color',ci);
   end;  title(' output');
   set(gcf,'num',' off','name',...
      ['Coherent Detection of ' tstr blanks (10) ' BBI 2000']);
   zoom xon;
end;

⌨️ 快捷键说明

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