diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /24/CH26/EX26.4/Example26_4.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '24/CH26/EX26.4/Example26_4.sce')
-rwxr-xr-x | 24/CH26/EX26.4/Example26_4.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/24/CH26/EX26.4/Example26_4.sce b/24/CH26/EX26.4/Example26_4.sce new file mode 100755 index 000000000..2a4e2a617 --- /dev/null +++ b/24/CH26/EX26.4/Example26_4.sce @@ -0,0 +1,17 @@ +exec('electrostatics.sci', -1)
+
+//Given that
+R = 6.85*10^-2 //in m
+q = 1.25*10^-9 //in C
+
+//Sample Problem 26-4a
+printf("**Sample Problem 26-4a**\n")
+C = 4*%pi*Eo*R
+U = q^2/(2*C)
+printf("The electric energy stored is equal to %eJ\n", U)
+
+//Sample Problem 26-4b
+printf("\n**Sample Problem 26-4b**\n")
+E = coulomb(q, 1, R)
+u = 1/2*Eo*E^2
+printf("The energy density is equal to %eJ/m^3", u)
\ No newline at end of file |