summaryrefslogtreecommitdiff
path: root/1271/CH20/EX20.7/example20_7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1271/CH20/EX20.7/example20_7.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1271/CH20/EX20.7/example20_7.sce')
-rwxr-xr-x1271/CH20/EX20.7/example20_7.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/1271/CH20/EX20.7/example20_7.sce b/1271/CH20/EX20.7/example20_7.sce
new file mode 100755
index 000000000..ceec6b5cc
--- /dev/null
+++ b/1271/CH20/EX20.7/example20_7.sce
@@ -0,0 +1,12 @@
+clc
+// Given that
+V = 12.4e3 // voltage in V
+i = 2e-3 // current in amp
+e = 1.6e-19 // charge on an electron in C
+// Sample Problem 7 on page no. 20.9
+printf("\n # PROBLEM 7 # \n")
+printf("Standard formula used \n ")
+printf("I = ne \n 1/2*m*v^2 = eV \n")
+n = i / e
+v = 0.593e6*sqrt(V)
+printf("\n Number of electrons striking the target per sec is %e.\n Speed of electrons is %e m/sec.",n,v)