Azzera filtri
Azzera filtri

Extracting data from 4-D double

18 visualizzazioni (ultimi 30 giorni)
Raymond Graham
Raymond Graham il 15 Gen 2021
Commentato: Raymond Graham il 15 Gen 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 Commenti
Raymond Graham
Raymond Graham il 15 Gen 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 il 15 Gen 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)

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by