summaryrefslogtreecommitdiff
path: root/24/CH27/EX27.2/Example27_2.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /24/CH27/EX27.2/Example27_2.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 '24/CH27/EX27.2/Example27_2.sce')
-rwxr-xr-x24/CH27/EX27.2/Example27_2.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/24/CH27/EX27.2/Example27_2.sce b/24/CH27/EX27.2/Example27_2.sce
new file mode 100755
index 000000000..513d95244
--- /dev/null
+++ b/24/CH27/EX27.2/Example27_2.sce
@@ -0,0 +1,16 @@
+//Given that
+R = 2*10^-3 //in meter
+J = 2*10^5 //in A/m^2
+
+//Sample Problem 27-2a
+printf("**Sample Problem 27-2a**\n")
+//As current density is uniform
+A = %pi*(R^2 - (R/2)^2)
+I = J*A
+printf("The current flowing through the outer portion is %fA\n", I)
+
+//Sample Problem 27-2b
+printf("\n**Sample Problem 27-2b**\n")
+a = 3*10^11 //in SI unit
+Iv = integrate('a*r^2*2*%pi*r', 'r', R/2, R)
+printf("Now the current will be %fA", Iv) \ No newline at end of file