sadra
Newbie
Why this code is incorrect?
Code:
% circular array
% Draw AF
% characteristics: 1) array radius= a 2)number of elements=N
% 3)weight of each element=Wn 4)phase angle of each element=phi_n
% 5)phase of each element=delta_n
% **********************************
clc
clear all
close all
N=input('Number of elements in array:');
% dl=input('space between elements :');
a=input('Enter array radius respect to lamba:');
%n=mod(N,2);
theta=0:pi/32:pi ;
phi=0:pi/32:2*pi ;
AF=0 ; %initiate
% i= 0+1i
%if n==0 % number of elements are even
for j=1:N
w(j)=input('Enter weight element : ' ) ;
delta(j)=input('Enter phase element : ' ) ;
phin(j)=2*pi*(j-1)/N;
AF=(w(j).*exp(-i*(-2*pi*a.*sin(theta).*cos(phi)+delta(j)))+AF);
end
plot3(AF,theta,phi)
Last edited by a moderator: