generate heat map based on lat/lon and data value

15 ビュー (過去 30 日間)
Ketan Bharucha
Ketan Bharucha 2021 年 11 月 23 日
コメント済み: Ketan Bharucha 2021 年 11 月 24 日
Hello,
I have a table with Lat/Lon and some error values. I would like to plot the lat/long and create a heatmap using the error value.
lat lon err_d
38.53 -77.40 194.4729
38.75 -77.04 147.9679
39.05 -77.91 340.3928
any help would be greatly appreciated.
Best,
KB
  6 件のコメント
Ketan Bharucha
Ketan Bharucha 2021 年 11 月 24 日
Thanks for your help.

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

採用された回答

KSSV
KSSV 2021 年 11 月 23 日
Let T be your grid...
x = T.lon ;
y = T.lat ;
z = T.err_d ;
% Convert the scattered data into grid
m = 100 ; % can be increased
[X,Y] = meshgrid(linspace(min(x),max(x),m),linspace(min(y),max(y),m)) ;
Z = griddata(x,y,z,X,Y) ;
pcolor(X,Y,Z)
shading interp
colorbar
  1 件のコメント
Ketan Bharucha
Ketan Bharucha 2021 年 11 月 24 日
Thank you, above helpped solve my problem.

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

その他の回答 (1 件)

Peter Perkins
Peter Perkins 2021 年 11 月 23 日
The heatmap function accepts a table as input, this should be a one-liner. If you are looking for a surface plot, KSSV's answer should work.

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by