summaryrefslogtreecommitdiff
path: root/24/CH33/EX33.4/Example33_4.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /24/CH33/EX33.4/Example33_4.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/CH33/EX33.4/Example33_4.sce')
-rwxr-xr-x24/CH33/EX33.4/Example33_4.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/24/CH33/EX33.4/Example33_4.sce b/24/CH33/EX33.4/Example33_4.sce
new file mode 100755
index 000000000..b5e05d7ee
--- /dev/null
+++ b/24/CH33/EX33.4/Example33_4.sce
@@ -0,0 +1,17 @@
+//Given that
+R = 200 //in Ohm
+Em = 36 //in volts
+fd = 60 //in Hz
+t = poly(0, 't')
+w = 2*%pi*fd
+//V = Em*sin(w*t)
+
+//Sample Problem 33-4a
+printf("**Sample Problem 33-4a**\n")
+//Vr = Emax*sin(w*t)
+printf("The voltage drop across the resistor is Vr=%1.2f*sin(%1.2f*t)\n", Em, w)
+
+//Sample Problem 33-4b
+printf("\n**Sample Problem 33-4b**\n")
+Ir = Em/R
+printf("The current in the resistor as a function of time is Ir=%1.2f*sin(%1.2f*t)", Ir, w) \ No newline at end of file