diff options
Diffstat (limited to '3773/CH2/EX2.6/Ex2_6.sce')
-rw-r--r-- | 3773/CH2/EX2.6/Ex2_6.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/3773/CH2/EX2.6/Ex2_6.sce b/3773/CH2/EX2.6/Ex2_6.sce new file mode 100644 index 000000000..85c55d552 --- /dev/null +++ b/3773/CH2/EX2.6/Ex2_6.sce @@ -0,0 +1,22 @@ +//Chapter 2: Antenna Basics +//Example 2-7.2 +clc; +clear; + +//Variable Initialization +theta_hp = 90 +phi_hp = 90 + +//Calculation +X=[0 0;%pi %pi;%pi 0]; +Y=[0 0;0 %pi;%pi %pi]; +function z = f(x,y), z=sin(x)*sin(x)*sin(x)*sin(y)*sin(y),endfunction +[I,err]=int2d(X,Y,f) //Exact Directivity(No unit) +direct_e=4*%pi/I //Exact Directivity(Unitless) +direct_apprx=41253.0/(theta_hp * phi_hp) //Approximate Directivity(Unitless) +db_diff=10*log10(direct_e/direct_apprx) //Difference(dB) + +//Result +mprintf("The exact directivity is %.1f",direct_e) +mprintf("\nThe approximate directivity is %.1f",direct_apprx) +mprintf("\nThe decibel difference is %.1f dB",db_diff) |