Hy guys. Can please someone help me. When I start the program I have an error: Error: Unexpected MATLAB operator.
%Tadej Trinko; three-dimensional antenna array pattern
%email:tadej.trinko@gmail.com
%Jožef Štefan International Postgraduate School (MPS IJS), Ljubljana,
%Slovenia
clear all;% element numbers N, wavenumber B
N = input ('Enter the Number of Array Elements : ') ; lambda = input ('Enter the Value of Lambda (c/f) : ') ;B =(2*pi/lambda);j = sqrt(-1);% Magnitude, Phase, X,Y,Z coordinate
for I = 1 : N Current = I An(I) = input ('Enter the Magnitude of the Current : ') ; Xn(I) = input ('Enter the Position of Element on X-axis : ') ; Yn(I) = input ('Enter the Position of Element on Y-axis : ') ; Zn(I) = input ('Enter the Position of Element on Z-axis : ') ; Jp(I) = input ('Enter the Phase of the Current : ') ;endPhi=(0:1:360)*pi/180;Theta=(0:1:180)*pi/180;[THETA,PHI]=meshgrid(Theta,Phi);% calculate the array factor
for I=1:N R=An(I)*exp(1j.*(Ep+Jp(I))); Ep=B*((Xn(I).*cos(PHI).*sin(THETA))+(Yn(I).*sin(THETA).*sin(PHI))+(Zn(I).*cos(THETA)));end%plot the array factor
X=R.*sin(THETA).*cos(PHI);Y=R.*sin(THETA).*sin(PHI);Z=R.*cos(THETA);figure();mesh(X,Y,Z); %display
surf(X,Y,Z) %colored faces
Equation (1) on page 4 in article: http://www.loe.ee.upatras.gr/EM/Journals/Array%20Factor%20Measurements%20A%20Preliminary%20Stage%20in%20a%20Methodology%20for%20Smart%20Antenna%20Characterization%20Measurements.pdf
Thank you for any advice or comment.
Regards, Tadej
Best Answer