필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
scour_man
scour_man 2011년 3월 10일
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

채택된 답변

Matt Tearle
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 CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by