Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
scour_man
scour_man am 10 Mär. 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

Akzeptierte Antwort

Matt Tearle
Matt Tearle am 10 Mär. 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)

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D 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!

Translated by