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 /1985/CH16/EX16.5 | |
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 '1985/CH16/EX16.5')
-rwxr-xr-x | 1985/CH16/EX16.5/Chapter16_example5.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/1985/CH16/EX16.5/Chapter16_example5.sce b/1985/CH16/EX16.5/Chapter16_example5.sce new file mode 100755 index 000000000..b1313adf3 --- /dev/null +++ b/1985/CH16/EX16.5/Chapter16_example5.sce @@ -0,0 +1,16 @@ +clc
+clear
+//Input data
+n=(1/6)//Efficiency
+T=82//Temperature to which the sink is reduced in K
+//Solving two equations
+//5T1=6T2
+//2T1=3T2-246
+A=[5 -6
+ 2 -3]//Coefficient matrix
+B=[0
+ -246]//Constant matrix
+X=inv(A)*B//Variable matrix
+
+//Output
+printf('The temperature of the source is %3.0f K \n The temperature of the sink is %3.0f K',X(1),X(2))
|