📄 sigsetpl.m
字号:
function z=sigsetpl(nir, air, pir);
%SIGSETPL Plots the ASK/PSK constellation.
% SIGSETPL(NIR, AIR, PIR) plots the QASK circle constellation with the
% number in each circle specified in NIC (Number_In_Circle); amplitude
% in each circle specified in AIC (Amplitude_In_Circle); and phase in
% each circle specified in PIC (Phase_In_Circle);
%
% SIGSETPL(NIR, AIR) plots the QASK circle constellation with default
% zero PIC.
%
% SIGSETPL(NIR) plots the QASK circle constellation with default unit
% increment for each circle AIC.
%
% Y = SIGSETPL(...) outputs a complex vector with its real part as the
% in-phase value and the imaginary part as the quadrature value.
%
% See also MODMAP, DMOD, DMOCE.
% Wes Wang 5/3/94, 10/11/95.
% Copyright (c) 1995-96 by The MathWorks, Inc.
% $Revision: 1.1 $ $Date: 1996/04/01 18:03:20 $
if nargin <= 0
disp('usage: SIGSETPL(NIR, AIR, PIR)');
return
end;
m = length(nir);
if nargin <= 1
air = [1:m];
end;
if nargin <= 2
pir = zeros(1,m);
end;
cax = newplot;
hold_state = ishold;
j=sqrt(-1);
z = exp(j*[0:100]*pi/50);
x=real(z); y=imag(z);
plot(x*max(air), y*max(air));
if ~hold_state
hold on
end;
zz=axis*1.05;
plot(zz(1:2),[0,0],'w');
plot([0,0],zz(3:4),'w');
z=[];
for i = 1:m
for k = 1:nir(i)
z = [z air(i)*exp(j*((k-1)*2*pi/nir(i)+pir(i)))];
end;
if (i ~= m)
plot(x*air(i), y*air(i));
end;
end;
% plot the ASK/PSK signal.
plot(z,'*r');
if ~hold_state
axis('equal');
axis('off');
text(zz(1)+(zz(2)-zz(1))/8, zz(3)-(zz(4)-zz(3))/30, 'ASK/PSK Signal Set Design Pattern');
hold off;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -