View previous topic :: View next topic 
Author 
Message 
Tagalb AntennaTheory.com Newbie
Joined: 28 Aug 2017 Posts: 2

Posted: Tue Aug 29, 2017 7:29 am Post subject: Problems in plotting figure 5 in the course antenna theory 


Hello
I am trying to plot the Figure 5 (Magnitude of the output as a function of the arrival angle for Antenna Array):http://www.antennatheory.com/arrays/main.php
But it seems like it is not so simple.
I wrote this simple code but I do not have the desired result:
teta_angle = 1:0.25:180;
y1= exp(j*pi*cos(teta_angle));
y2= exp(j*pi*cos(teta_angle));
y=y1+y2;
Y=mag2db(abs(y));
plot(teta_angle,Y)
Could you maybe help me to figure out what is wrong with my code ?
Thanks 

Back to top 


admin Site Admin
Joined: 03 Jan 2007 Posts: 197

Posted: Tue Aug 29, 2017 5:13 pm Post subject: 


Looks like your taking cosine of an angle in degrees, should be radians 

Back to top 


Tagalb AntennaTheory.com Newbie
Joined: 28 Aug 2017 Posts: 2

Posted: Thu Aug 31, 2017 2:01 pm Post subject: 


Actually I found it, thank you 

Back to top 


