How can I show in a map a certain value in given its latitude and longitude?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Antworten (1)
bio lim
am 9 Jul. 2015
Bearbeitet: bio lim
am 9 Jul. 2015
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 Kommentare
bio lim
am 10 Jul. 2015
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
Siehe auch
Kategorien
Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!