Plotting a temperature Depth Profile

27 views (last 30 days)
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!

Accepted Answer

David Hill
David Hill on 11 Nov 2019
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.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!