diff options
Diffstat (limited to '3773/CH2/EX2.2/Ex2_2.sce')
-rw-r--r-- | 3773/CH2/EX2.2/Ex2_2.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/3773/CH2/EX2.2/Ex2_2.sce b/3773/CH2/EX2.2/Ex2_2.sce new file mode 100644 index 000000000..c00b37c47 --- /dev/null +++ b/3773/CH2/EX2.2/Ex2_2.sce @@ -0,0 +1,24 @@ +//Chapter 2: Antenna Basics +//Example 2-3.2 +clc; + +//Variable Initialization +e_half_power = 1/sqrt(2) //E(theta) at half power(unitless) +e_null = 0 //E(theta) = 0 at null points (unitless) +theta_1 = 0 //theta' (degrees) +theta = 1 //theta (degrees) + +//Calculation +for x=0:2 //loop untill theta = i +theta = 0.5*acos(e_half_power/cos(theta_1*%pi/180)) //theta(radian) +theta_1 = theta*180/%pi //theta(degrees) +end + +hpbw = 2*(theta*180/%pi) //Half-power beamwidth (Degrees) +theta = 0.5*acos(e_null) //theta (radians) +fnbw = 2*(theta*180/%pi) //Beamwidth between first null (degrees) + +//Result +mprintf("The half power beamwidth is %.2f degrees",hpbw) +mprintf("\nThe beamwidth between first nulls is %d degrees", fnbw) + |