How can I plot geothermal gradient values in Matlab?

조회 수: 1 (최근 30일)
Chibuzo Ahaneku
Chibuzo Ahaneku 2019년 6월 24일
I am trying to plot three geothermal gradient values to evaluate the thickness of gas hydrate stability zone. I think I may written the wrong code for this because the higher geothermal gradient is plotting as the deeper line and the lesser geothermal gradient is plotting as the shallower line. The reverse is supposed to be the case. Please, see the attached figures.
This is the code:
data1=dlmread('HPBdata.txt');
data10=dlmread('WDSTGGR.txt');
figure
hold on
plot(data1(:,1),data1(:,2),'-r','displayname','100%CH4');
set(gca,'ydir','reverse');
xlabel('Temperature (\circC)');
ylabel('Depth (m)');
plot(data1(:,1),data1(:,3),'--g','displayname','90%CH4, 10%C2H6');
plot(data1(:,1),data1(:,4),'-g','displayname','95%CH4, 5%C3H8');
plot(data1(:,1),data1(:,6),'-m','displayname','79.29%CH4, 9.33%C2H6, 2.80%C3H8, 1.12%iC4H10, 7.46%nC4H10');
plot(data1(:,1),data1(:,7),'-c','displayname','74.43%CH4, 5.82%C2H6, 3.72%C3H8, 1.72%iC4H10,1.15%nC4H10, 4.77%H2S, 6.68%CO2, 1.72%N2');
plot(data1(:,1),data1(:,8),'--r','displayname','90%CH4, 8%C2H6, 2%C3H8');
N=4;
Seafloordepth=(data10(N,1));
xMin=0;
xMax=30;
plot([xMin xMax],[Seafloordepth Seafloordepth],'-b','displayname','Seafloor Depth');
temp1=18;
temp2=data10(N,2);
plot([temp1 temp2],[0 Seafloordepth],':k','displayname','Hydrothermal gradient');
x=temp2;
y=Seafloordepth;
xList=temp2:1:xMax;
m=data10(N,3);
xl=x;
yl=y;
yList=m*(xList-xl)+yl;
plot(xList,yList,'-.k','displayname','Geothermal gradient @30 \circC/km');
m=data10(N,4);
xl=x;
yl=y;
yList=m*(xList-xl)+yl;
plot(xList,yList,'--k','displayname','Geothermal gradient @33 \circC/km');
m=data10(N,5);
xl=x;
yl=y;
yList=m*(xList-xl)+yl;
plot(xList,yList,'-k','displayname','Geothermal gradient @36 \circC/km');
grid on
grid minor

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by