summaryrefslogtreecommitdiff
path: root/1544/CH1/EX1.20/Ch01Ex20.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1544/CH1/EX1.20/Ch01Ex20.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 '1544/CH1/EX1.20/Ch01Ex20.sce')
-rwxr-xr-x1544/CH1/EX1.20/Ch01Ex20.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/1544/CH1/EX1.20/Ch01Ex20.sce b/1544/CH1/EX1.20/Ch01Ex20.sce
new file mode 100755
index 000000000..bda517791
--- /dev/null
+++ b/1544/CH1/EX1.20/Ch01Ex20.sce
@@ -0,0 +1,12 @@
+// Scilab code Ex1.20: Pg. 24 (2008)
+clc; clear;
+R_1 = 120; // Resistance, ohms
+Theta_1 = 16; // Temperature, degree celcius
+Theta_2 = 32; // Temperature, degree celcius
+Alpha = -4.8e-04; // Temperature coefficient, per degree celcius
+// Using relation, R_1/R_2 = ( 1 + Alpha*Theta_1 )/( 1 + Alpha*Theta_2 ), solving for R_2
+R_2 = R_1 * (( 1 + Alpha*Theta_2 )/( 1 + Alpha*Theta_1 )); // Resistance, ohm
+printf("\nThe resistance of carbon resistor at %2d degree celcius = %5.1f ohm",Theta_2, R_2)
+
+// Result
+// The resistance of field coil at 32 degree celcius = 119.1 ohm