From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1985/CH16/EX16.5/Chapter16_example5.sce | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 1985/CH16/EX16.5/Chapter16_example5.sce (limited to '1985/CH16/EX16.5') 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)) -- cgit