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 --- 443/CH8/EX8.4/8_4.sce | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 443/CH8/EX8.4/8_4.sce (limited to '443/CH8/EX8.4/8_4.sce') diff --git a/443/CH8/EX8.4/8_4.sce b/443/CH8/EX8.4/8_4.sce new file mode 100755 index 000000000..45a28d7f3 --- /dev/null +++ b/443/CH8/EX8.4/8_4.sce @@ -0,0 +1,22 @@ +pathname=get_absolute_file_path('8_4.sce') +filename=pathname+filesep()+'8_4_data.sci' +exec(filename) +h=0:6000 +h1=h/(1) +[m n]=size(h1) +for i=1:n +//Temperature at h(in K) +Tal(i)=Tsl-0.0065*(h1(i)); +//Variation in air pressure +pal(i)=1/(10^(h1(i)/19200)); +//Density at sea level +Psl=(psl*10^5)/(R*Tsl) +//Density at height h +Pal(i)=(pal(i)*10^5)/(R*Tal(i)); +//Air fuel ratio at height h +AFal=AFsl*sqrt(Pal/Psl) +end; +//Plotting Air fuel ratio and Height +plot(h1,AFal) +legend(['Air fuel ratio';'Height']); +xtitle('Air fuel ratio vs Height','Height(in m)','Airfuel ratio') \ No newline at end of file -- cgit