Creating a 3-D Plot/Contour Map from Matrix...
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michelle De Luna
am 1 Apr. 2021
Kommentiert: Michelle De Luna
am 2 Apr. 2021
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 Kommentare
Akzeptierte Antwort
darova
am 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)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Contour 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!