%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% File Name: qpskmod.m
% Function: Modulation for QPSK
% Author:
% Date: 2008.11.27
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [iout,qout]=qpskmod(paradata,nd,ml)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% variables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% paradata : input data
% nd : number of data
% ml : number of modulation levels
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
m2=ml./2;
paradata2=paradata.*2-1;
count2=1; %symbol accumulation
for jj=1:nd
iout(1,jj) = paradata2(1,count2);
qout(1,jj)= paradata2(1,m2+count2);
count2=count2+ml;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%