How can I show in a map a certain value in given its latitude and longitude?

1 次查看(过去 30 天)
Hello, I have a 3D(Lat,Long,Value) array as:
-3.69834356435644 40.3692049504951 55.2800325952722
-5.75910000000000 41.6759400000000 278.508909991090
1.05841800000000 41.6189370000000 21.5032056211029
-0.436050000000000 39.3093500000000 17.2475501005075
-0.292116000000000 38.5694000000000 91.8952819098190
-4.19764000000000 37.2504133333333 126.180495487668
1.27530961538462 41.2542115384615 237.219637267762
-3.64700000000000 40.4734000000000 6.22601788331549e-13
-3.70983333333333 40.4095000000000 1.36949196158669
-3.77925000000000 40.4540750000000 4.40546655566579
-8.50187222222223 37.3327888888889 964.334069593729
-6.87703666666667 37.0378233333333 397.966638769665
-3.70237777777778 40.3868611111111 3.62935043132483
-3.84033469387755 39.0579571428572 62.1590511465560
2.40896363636364 41.5235454545455 21.7058628942069
How can I generate a spatial heatmap given this structure? Thanks in advance.

回答(1 个)

bio lim
bio lim 2015-7-9
编辑:bio lim 2015-7-9
I think the following is what you are asking for.
A = [-3.69834356435644 40.3692049504951 55.2800325952722;
-5.75910000000000 41.6759400000000 278.508909991090;
1.05841800000000 41.6189370000000 21.5032056211029;
-0.436050000000000 39.3093500000000 17.2475501005075;
-0.292116000000000 38.5694000000000 91.8952819098190;
-4.19764000000000 37.2504133333333 126.180495487668;
1.27530961538462 41.2542115384615 237.219637267762;
-3.64700000000000 40.4734000000000 6.22601788331549e-13;
-3.70983333333333 40.4095000000000 1.36949196158669;
-3.77925000000000 40.4540750000000 4.40546655566579;
-8.50187222222223 37.3327888888889 964.334069593729;
-6.87703666666667 37.0378233333333 397.966638769665;
-3.70237777777778 40.3868611111111 3.62935043132483;
-3.84033469387755 39.0579571428572 62.1590511465560;
2.40896363636364 41.5235454545455 21.7058628942069];
colormap('hot')
imagesc(A(:,2), A(:,1), A(:,3))
xlabel('Longitude');
ylabel('Latitude');
colorbar
  2 个评论
bio lim
bio lim 2015-7-10
N = 1000;
[Xi, Yi] = meshgrid(linspace(37,42,N),linspace(-6.9,2.5,N));
Ci = griddata(A(:,2), A(:,1), A(:,3), Xi, Yi);
colormap ('hot')
imagesc(linspace(37,42,N),linspace(-6.9,2.5,N),Ci);
xlabel('Longitude');
ylabel('Latitude');
colorbar

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by