Extracting data from 4-D double

17 visualizaciones (últimos 30 días)
Raymond Graham
Raymond Graham el 15 de En. de 2021
Comentada: Raymond Graham el 15 de En. de 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 comentarios
Raymond Graham
Raymond Graham el 15 de En. de 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 el 15 de En. de 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)

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by