blob: 6f8a7eb556d4c6eb166987f65128ef2f3d358456 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//Example 12_3
clc();
clear;
//To find the final temperature
t1=27 //units in Centigrade
t1=t1+273 //Units in K
gama=1.4 //Units in Constant
p1=1 //units in Pa
v1_v2=15 //Units of in ratio
logT2=log10(t1)-((gama-1)*(log10(p1)-log10(v1_v2)))
T2=10^logT2 //Units in K
printf("The final temperature is T2=%d K",T2)
|