%% Find Reference Symbols with Counterclockwise Rotation
% Find reference symbols for a chosen modulation scheme and counterclockwise rotation.
%% Reference Symbols for \frac{\pi }{2}-BPSK
% Specify a \frac{\pi }{2}-BPSK modulation scheme and a counterclockwise rotation of \frac{\pi }{6}.

mod = 'pi/2-BPSK';
phase =  pi/6;

% Find the reference symbols for the chosen modulation and rotation.

refSym = wlanReferenceSymbols(mod,phase);

% Display the reference symbols on a constellation diagram.

figure;
plot(refSym,'b*');
hold on;
title('Reference Symbols for $\frac{\pi}{2}$-BPSK','Interpreter','latex');
legend('Reference symbols');

%% Reference Symbols for \frac{\pi }{2}-16-QAM
% Specify a \frac{\pi }{2}-16-QAM modulation scheme and a counterclockwise rotation of \frac{\pi }{3}.

mod = 'pi/2-16QAM';
phase =  pi/3;

% Find the reference symbols for the chosen modulation and rotation.

refSym = wlanReferenceSymbols(mod,phase);

% Display the reference symbols on a constellation diagram.

figure;
plot(refSym,'b*');
hold on;
title('Reference Symbols for $\frac{\pi}{2}$-16-QAM','Interpreter','latex');
legend('Reference symbols');

% Copyright 2018 The MathWorks, Inc.