matlab: updates to LH/RH circ. polarization calculation

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
pull/1/head
Thorsten Liebig 2013-02-13 13:56:18 +01:00
parent dea4065ca1
commit 1f285996fc
1 changed files with 5 additions and 6 deletions

View File

@ -61,12 +61,11 @@ nf2ff.E_cprh = [];
nf2ff.E_cplh = [];
% Setup vectors for converting to LHCP and RHCP polarization senses
cosphi = cos(nf2ff.phi)';
sinphi = sin(nf2ff.phi)';
[THETHA PHI] = ndgrid(nf2ff.theta,nf2ff.phi);
cosphi = cos(PHI);
sinphi = sin(PHI);
for f=1:numel(nf2ff.freq)
for n = 1:numel(nf2ff.theta)
nf2ff.E_cprh{f}(n,:) = (cosphi+1i*sinphi) .* (nf2ff.E_theta{f}(n,:)+1i*nf2ff.E_phi{f}(n,:))/sqrt(2);
nf2ff.E_cplh{f}(n,:) = (cosphi-1i*sinphi) .* (nf2ff.E_theta{f}(n,:)-1i*nf2ff.E_phi{f}(n,:))/sqrt(2);
end
nf2ff.E_cprh{f} = (cosphi+1i*sinphi) .* (nf2ff.E_theta{f}+1i*nf2ff.E_phi{f})/sqrt(2);
nf2ff.E_cplh{f} = (cosphi-1i*sinphi) .* (nf2ff.E_theta{f}-1i*nf2ff.E_phi{f})/sqrt(2);
end