MATLAB Answers

0

Plotting a temperature Depth Profile

Asked by Lloyd Towler on 11 Nov 2019 at 22:40
Latest activity Answered by David Hill on 11 Nov 2019 at 23:45
How would i go about importing 4 separate data sets of depth and temperature from excel, and combining them all into 1 graph with temperature on the x axis and depth on the y axis. However i need the y axis to start from the top and the x axis to be on the top as well. Been having a go at this for quite a while now without any luck so far!

  0 Comments

Sign in to comment.

Products


Release

R2019b

1 Answer

Answer by David Hill on 11 Nov 2019 at 23:45
 Accepted Answer

A = readmatrix('name.xls');%I will assume temperature is in the first column and depth in the second column
B = readmatrix('name.xls');
C = readmatrix('name.xls');
D = readmatrix('name.xls');
hold on
plot(A(:,1),A(:,2));
plot(B(:,1),B(:,2));
plot(C(:,1),C(:,2));
plot(D(:,1),D(:,2));
a= gca;
a.XAxisLocation='top';
This should get you going along the righ path.

  0 Comments

Sign in to comment.