Effacer les filtres
Effacer les filtres

Lat / Long and Elevation Data - Seabed survey - Surface Plot

2 vues (au cours des 30 derniers jours)
scour_man
scour_man le 10 Mar 2011
I have data from a seabed survey in Excel format - 3 columns, the first one contains the Eastings, the second contains the Northing and the third column contains the corresponding elevation in metres. I would like to create a suface plot in Matlab but I believe I first need to somehow arrange the data into matrix form?
Any help would be much appreciated! Thanks

Réponse acceptée

Matt Tearle
Matt Tearle le 10 Mar 2011
This seems to be the question du jour. If the data is actually on a grid, you should just be able to reshape your vectors into matrices. If not:
% Make some fake vector data
x = rand(100,1)*4-2;
y = rand(100,1)*4-2;
z = x.*exp(-x.^2-y.^2);
% Put data onto a grid
[qx,qy] = meshgrid(linspace(min(x),max(x)),linspace(min(y),max(y)));
F = TriScatteredInterp(x,y,z);
qz = F(qx,qy);
Either way, once in matrix form
surf(qx,qy,qz)

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by