Creating a 3-D Plot/Contour Map from Matrix...

8 views (last 30 days)
Good evening!
I have multiple 21 x 21 matrices that represent temperature at 21 different atmospheric pressure levels and 21 different parallels of latitude. I am able to visualize fluctuations in temperature through the atmosphere and at different latitudes just fine using a simple 2-D contour method. In other words, I use the contour function on the 21 x 21 matrix to check temperature on a plot where the x-axis represents latitude and the y-axis represents atmospheric pressure level; temperature is indicated using isoline, or lines that connect constant values of temperature.
Each 21 x 21 matrix represents temperature values along a SINGLE meridian of longitude. So, each matrix is like a "slice" running along one single longitude but 21 different pressure levels and 21 latitudes. Is there any way to piece together a bunch of these 21 x 21 matrices or "slices" to make a 3-D plot or contour map? So that I not only show temperature across pressure levels and latitudes but also along various longitudes? Any help would be greatly appreciated.
Best,
M.

Accepted Answer

darova
darova on 1 Apr 2021
Try griddata
x = rand(20,1);
y = rand(20,1);
z = rand(20,1);
[x1,y1] = meshgrid(0:0.1:1);
z1 = griddata(x,y,z,x1,y1);
plot3(x,y,z,'or')
surface(x1,y1,z1)

More Answers (0)

Categories

Find more on Contour Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!