blob: 9308e465a2887f8ea26895e4dd401d203de722cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
clc
clear
//INPUT DATA
n=1/5;//Fraction of heat input converted into power
ts=100;//Reduced sink temperature in Degree C
//CALCULATIONS
//4Th-5Tl=0
//3Th-5Tl=-500
A=[4 -5
3 -5]//Coefficient matrix
B=[0
-500]//Constant matrix
X=inv(A)*B//Variable matrix
//Output
printf('(a)The temperature of the source is %3.f K \n (b)The temperature of sink is %3.f K',X(1),X(2))
|