Extracting data from 4-D double

17 Ansichten (letzte 30 Tage)
Raymond Graham
Raymond Graham am 15 Jan. 2021
Kommentiert: Raymond Graham am 15 Jan. 2021
Hello-
I am trying to extract individual variables from a 4-D double array. The variable Q (specific humidity) is:
Size: 25x41x6x168
Dimensions: longitude,latitude,level,time
Datatype: int16
I would like to create individual variables for Lon, Lat and Level in order to create a contour plot of Q. Any tips?
Also, seems like a rather basic question but if the 4 dimensions of Q are lon, lat, level and time, where is the data for Q (specific humidity) itself?
  6 Kommentare
Raymond Graham
Raymond Graham am 15 Jan. 2021
Found this image online, this is essentially what I'm aiming for..... If only I generate a code from a jpeg.
Raymond Graham
Raymond Graham am 15 Jan. 2021
color_bottom = min(Q(1,:));
color_top = max(Q(1,:));
figure(1);clf
contour3(x,y,P,1,Q(:,:,1,1));
colormap(jet);
ylabel('Latitude')
xlabel('Longitude')
zlabel('Pressure_level')
caxis manual
caxis([color_bottom color_top]);
colormap(jet/1.2);
colorbar;
trying this currently, it runs through and creates a 3-D plot with the correct axis, but there is no data (aka the figure is blank)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots 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