Filter löschen
Filter löschen

Temperature with depth graph

5 Ansichten (letzte 30 Tage)
Jack Lakeman
Jack Lakeman am 7 Nov. 2016
Beantwortet: KSSV am 8 Nov. 2016
Hi everyone!
So I'm trying to plot a graph of temperature with depth at 4 stations with varied depths. The data that i have is in 4 different files and I'm trying to combine them all into 1 graph with temperature on the x axis and depth on the y axis but i need the y axis to start from the top and the x axis to be on the top as well.
I'v tried multiple times to do this but cant seem to work it out
Thanks in advance!!

Akzeptierte Antwort

KSSV
KSSV am 8 Nov. 2016
[num,txt,raw] = xlsread('Temperature set.csv');
% num = flipud(num) ;
depth = num(:,1) ;
s1 = num(:,2) ;
s2 = num(:,3) ;
s3 = num(:,4) ;
s4 = num(:,5) ;
% plot
hold on
plot(s1,depth,'r') ;
plot(s2,depth,'b') ;
plot(s3,depth,'m') ;
plot(s4,depth,'c') ;
set(gca,'xaxisLocation','top')
set(gca,'YDir','reverse');
legend([{'station 1'};{'station 2'}; {'station 3'};{'station 4'}] )

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by