summaryrefslogtreecommitdiff
path: root/2780/CH12/EX12.1/Ex12_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '2780/CH12/EX12.1/Ex12_1.sce')
-rwxr-xr-x2780/CH12/EX12.1/Ex12_1.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/2780/CH12/EX12.1/Ex12_1.sce b/2780/CH12/EX12.1/Ex12_1.sce
new file mode 100755
index 000000000..b33820620
--- /dev/null
+++ b/2780/CH12/EX12.1/Ex12_1.sce
@@ -0,0 +1,13 @@
+clc
+//to calculate electric flux
+//electric flux through a surface is phi=vector(E)*vector(s)
+//where vector E=2i+4j+7k,vector s=10j
+E=4 //E=4j
+s=10 //s=10j
+phi=E*s
+disp("electric flux is phi="+string(phi)+"units")
+//to calculate flux coming out of any face of the cube
+q=1 //charge in coulomb
+epsilon0=8.85*10^-12 //permittivity in free space in coul^2/N-m^2
+phi1=q/(6*epsilon0)
+disp("flux coming out of any face of the cube is phi1="+string(phi1)+"N-m^2/coul^2")