Creating a 3-D Plot/Contour Map from Matrix...
9 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
darova
2021-4-1
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)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!