Lat / Long and Elevation Data - Seabed survey - Surface Plot
4 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
Matt Tearle
2011-3-10
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)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mapping Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!