Plot Sea Current in Time vs Depth

11 Ansichten (letzte 30 Tage)
eko supriyadi
eko supriyadi am 8 Aug. 2017
Kommentiert: KSSV am 8 Aug. 2017
Hello everyone!
I'm trying to plot a contour of sea current with time (in month) on the x axis vs depth (in meter) on the y axis.
The data (excel) is attached
I'v tried multiple times to do this but cant seem to work it out
Thanks in advance!!

Akzeptierte Antwort

KSSV am 8 Aug. 2017
[num,txt,raw] = xlsread('current data') ;
depth = num(:,1) ;
currents = num(:,2:end) ;
[nx,ny] = size(currents) ;
%%plot of currents vs depth
hold on
for i = 1:ny
x = 1:12 ;
y = currents(i,:) ;
z = depth(i)*ones(size(x)) ;
  2 Kommentare
KSSV am 8 Aug. 2017
It's good you have attached a image....
[num,txt,raw] = xlsread('current data') ;
depth = num(:,1) ;
months = 1:12 ;
[X,Y] = meshgrid(months,depth) ;
currents = num(:,2:end) ;

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)


Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by