How create a raster (or DEM) from 3D points?
Afficher commentaires plus anciens
Hello
I have 3D points from a city contain x,y,z and I want to create a rater from this points. it means I want to use Z as value of my raster. is there any suggestion or code for me to get good result?
Réponses (1)
KSSV
le 24 Avr 2020
It depends how your data is scattered or gridded. Check the below two ways to plot your data.
%%structured
xi = unique(x) ; yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = reshape(z,size(X)) ;
figure
surf(X,Y,Z)
%%unstructured
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trisurf(tri,x,y,z)
Also read about griddata, scatteredinterpolant.
Catégories
En savoir plus sur Map Display dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!