summaryrefslogtreecommitdiff
path: root/3773/CH5/EX5.1/Ex5_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3773/CH5/EX5.1/Ex5_1.sce')
-rw-r--r--3773/CH5/EX5.1/Ex5_1.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/3773/CH5/EX5.1/Ex5_1.sce b/3773/CH5/EX5.1/Ex5_1.sce
new file mode 100644
index 000000000..e0ea98851
--- /dev/null
+++ b/3773/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,17 @@
+//Chapter 5: Point Source and Their Arrays
+//Example 5-6.1
+clc;
+clear;
+
+//Variable Initialization
+Um=1 //Maximum radiation intensity (unitless)
+
+//Calculation
+deff('z=f(x,y)','z=cos(x)*sin(x)')//Integrand(Unitless)
+X=[0 0;%pi/2 %pi/2;%pi/2 0];
+Y=[0 0;2*%pi 2*%pi;0 2*%pi];
+[I,err]=int2d(X,Y,f)//Total power radiated (relative to Um)
+
+D=(4*%pi)/I //Directivity (unitless)
+
+mprintf('The directivity is %f',D)