Plotting a surface plot for latitude, longitude and depth

71 ビュー (過去 30 日間)
Neil Spiteri
Neil Spiteri 2016 年 1 月 5 日
コメント済み: Youssef Wehbe 2020 年 4 月 1 日
Hi guys
I have a number of latitude, longitude and depth data points which I want to plot as a surface. Each latitude and longitude coordinates correspond to a unique depth value. I was thinking of using the mesh to plot the surface, but I am not sure how to do it. Any help?
Thanks!
  1 件のコメント
francesco lanzillo
francesco lanzillo 2017 年 3 月 10 日
Hey I have the same problem! Did you manage to solve it? thank you

サインインしてコメントする。

回答 (3 件)

Mani Ahmadian
Mani Ahmadian 2016 年 1 月 5 日
Hi, I think this code solves your problem:
function utm_plot(long, lat, altitude)
clc
close all
[X, Y]=meshgrid(long, lat)
figure('name','3D Plot', 'NumberTitle','off')
surfc(X, Y, altitude)
colorbar()
axesm utm
grid on
hold on
legend()
end
  1 件のコメント
Neil Spiteri
Neil Spiteri 2016 年 1 月 5 日
編集済み: Neil Spiteri 2016 年 1 月 5 日
I tried that, but I got this error "The surface Z must contain more than one row or column." where Z in my case corresponds to altitude

サインインしてコメントする。


Chad Greene
Chad Greene 2016 年 1 月 5 日
Your scattered data points must be fit to a surface. There are a number of ways to get a surface from scattered data, so you'll have to make some decisions.
First, convert lat and lon to some proper projected x and y coordinates. This is necessary because spacing of latitude lines does not equal spacing of longitude lines. Fitting to a surface will require some even spacing in x and y. If you have the Mapping Toolbox, convert to map x,y coordinates with the projfwd function.
With your scattered data in x,y coordinates, you might want to try gridfit to generate a surface. The two big decisions you'll have to make with gridfit are
1. spatial resolution, which affects the time it takes to solve gridfit, and
2. smoothness parameter. Tuning the smoothness parameter may take some trial and error. It's essentially fitting a pliable plate to your scattered data points. The smoothing parameter defines how stiff that plate is.
After gridfit you can plot with surf, pcolor, imagesc, mesh, etc.
  1 件のコメント
Youssef Wehbe
Youssef Wehbe 2020 年 4 月 1 日
Hi Chad - I have an aircraft dataset and would like to plot a 3D flight track (lat,lon,elev) and color the markers according to a depth (dust concentration in my case). Any help is greatly appreciated!

サインインしてコメントする。


Ka Mirul
Ka Mirul 2018 年 1 月 27 日
This video may help you (SGP4 Propagator) : https://youtu.be/u4UPmUPInAY Good luck.

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by