summaryrefslogtreecommitdiff
path: root/914/CH7/EX7.22
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /914/CH7/EX7.22
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '914/CH7/EX7.22')
-rwxr-xr-x914/CH7/EX7.22/ex7_22.sce31
1 files changed, 16 insertions, 15 deletions
diff --git a/914/CH7/EX7.22/ex7_22.sce b/914/CH7/EX7.22/ex7_22.sce
index 58cd4271f..3e72f71d4 100755
--- a/914/CH7/EX7.22/ex7_22.sce
+++ b/914/CH7/EX7.22/ex7_22.sce
@@ -1,15 +1,16 @@
-clc;
-warning("off");
-printf("\n\n example7.22 - pg321");
-// given
-To=545.67; //[degR] - air temperature at beach level
-betaa=-0.00357; //[degR/ft] - constant
-R=1545; //[Torr*ft^3/degR*mole] - gas constant
-M=29;
-deltaz=25000; //[ft]
-// using the equation ln(p/po)=((M)/(R*betaa))*ln(To/(To+betaa*deltaz)
-p=po*exp(((M)/(R*betaa))*log(To/(To+betaa*deltaz)));
-printf("\n\n p=%fTorr",p);
-// using the equation T=To+betaa*deltaz
-T=To+betaa*deltaz;
-printf("\n\n T=%fdegR",T);
+clc;
+warning("off");
+printf("\n\n example7.22 - pg321");
+// given
+To=545.67; //[degR] - air temperature at beach level
+po = 760; //torr
+betaa=-0.00357; //[degR/ft] - constant
+R=1545; //[Torr*ft^3/degR*mole] - gas constant
+M=29;
+deltaz=25000; //[ft]
+// using the equation ln(p/po)=((M)/(R*betaa))*ln(To/(To+betaa*deltaz)
+p=po*exp(((M)/(R*betaa))*log(To/(To+betaa*deltaz)));
+printf("\n\n p=%fTorr",p);
+// using the equation T=To+betaa*deltaz
+T=To+betaa*deltaz;
+printf("\n\n T=%fdegR",T); \ No newline at end of file