function x=qam16mod(paradata,para,ml);
d=1/sqrt(10);
for ii=1:para
if paradata(ii,1)==0
if paradata(ii,2)==0
if paradata(ii,3)==0
if paradata(ii,4)==0
temp(ii)=3*d+3*d*j;%0000
else
temp=d+3*d*j;%0001
end
else
if paradata(ii,4)==0
temp=-3*d+3*d*j;%0010
else
temp=-d+3*d*j;%0011
end
end
else
if paradata(ii,3)==0
if paradata(ii,4)==0
temp(ii)=3*d+d*j;%0100
else
temp(ii)=d+d*j;%0101
end
else
if paradata(ii,4)==0
temp(ii)=-3*d+d*j;%0110
else
temp(ii)=-d+d*j;%0111
end
end
end
else
if paradata(ii,2)==0
if paradata(ii,3)==0
if paradata(ii,4)==0
temp(ii)=3*d-3*d*j;%1000
else
temp(ii)=d-3*d*j;%1001
end
else
if paradata(ii,4)==0
temp(ii)=-3*d-3*d*j;%1010
else
temp(ii)=-d-3*d*j;%1011
end
end
else
if paradata(ii,3)==0
if paradata(ii,4)==0
temp(ii)=3*d-d*j;%1100
else
temp(ii)=d-d*j;%1101
end
else
if paradata(ii,4)==0
temp(ii)=-3*d-d*j;%1110
else
temp(ii)=-d-d*j;%1111
end
end
end
end
end
x=temp;