matlab code for isotropic point source antena array

Status
Not open for further replies.

Pulkit Varshney

Member level 5
Joined
Aug 30, 2011
Messages
82
Helped
13
Reputation
26
Reaction score
12
Trophy points
1,288
Activity points
1,731
want to see a plot for isotropic point source antenna array but not getting the right output.
can anybody tell me where i am doing the mistake.

n=4; // no. of point sources
k=2; //(for distance between adjacent sources; d=lambda/k)
delta=0; //succesive phase diff
phi=0:0.1:2*pi; //angle
s=(2*pi*cos(phi)/k)+delta; //(=(beta*d*cos(phi))+delta)
E=(sin(n*s/2))/(n*sin(s/2)); //electric field
plot(phi,E)
 

You forgot to add a "." to compute the element-by-element division.
That's a very common mistake. Even if you know, it is very easy to forget.

Use
E=(sin(n*s/2))./(n*sin(s/2));
Instead of
E=(sin(n*s/2))/(n*sin(s/2));
 

[/COLOR]yes eagle5 i got it...
but now i am facing problem in polar plot of this
i am using the command polar(phi,abs(E))
and i am varyin phi as phi=0:.001:2*pi
i got the error as:
Error using ==> line
Too many input arguments.

Error in ==> polar at 93
hhh=line([-maxrho -maxrho maxrho maxrho],[-maxrho maxrho maxrho -maxrho],'parent',cax);

Error in ==> antenna at 7
polar(phi,abs(E))

---------- Post added at 18:46 ---------- Previous post was at 18:44 ----------
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…