0% found this document useful (0 votes)
13 views3 pages

CLC Clear Fscanfmat Disp: X X P X, H X, T X,, , P, H

Papers

Uploaded by

mbb719198
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

CLC Clear Fscanfmat Disp: X X P X, H X, T X,, , P, H

Papers

Uploaded by

mbb719198
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

clc;

clear;
clf;
X=fscanfMat("E:\college material\atmosphere\database.txt")
disp(X)
P=X(:,1);
H=X(:,2)/1000;
T=X(:,3);

subplot(2,2,1)
plot(P,H,"r")
xlabel("pressure.(hpa)")
ylabel("Height.(km)")
title("Pressure.v/s.Height",'fontsize',5)

subplot(2,2,2)
plot(T,H,"b")
xlabel("temperature.(`C)")
ylabel("Height.(km)")
title("temperature.v/s.Height",'fontsize',5)

subplot(2,2,3)
plot(T,P,"b")
xlabel("temperature.(`C)")
ylabel("pressure.(hpa)")
title("temperature.v/s.pressure",'fontsize',5)
ax=get("current_axes")
ax.axes_reverse=["off","on","off"]

subplot(2,2,4)
plot(T,log10(P),"r")
xlabel("temperature.(`C)")
ylabel("Log10(pressure).(hpa)")
title("temperature.v/s.Log10(pressure)",'fontsize',5)
ax=get("current_axes")
ax.axes_reverse=["off","on","off"]
clc;
clear;
clf;
R=287.04
g=9.8065

D=fscanfMat("E:\college material\atmosphere\database.txt")
p=D(:,1)
t=D(:,3)
t=t+273.15
h=D(:,2)

Z=-1*(((R*t)/g).*log(p/1013))
disp("Height (in Km):",Z/1000)

title("Height Expressed as a Function of Pressure")


xlabel("Pressure(in hPa)")
ylabel("Height(in Km)")
plot(p,Z/1000)
plot(p,h/1000,'-r')
legend(['Calculated Curve','Theoretical Curve'],1)

You might also like