plotting lat, lon, altitude, variable
14 次查看(过去 30 天)
显示 更早的评论
I have 3 vectors of latitude, longitude, and elevation respectively. I also have a corresponding 3d matrix of size latitude*longitude*elevation which contains some data (Temperature). I want to display the Temperature data in 3d space. What is the best way to do this? Note: I don't want to use trisurf because it requires reshaping the matrix into 3 separate vectors, with which I found difficulty in tracking the data points.
Many thanks.
-Sagar
0 个评论
采纳的回答
Chad Greene
2015-3-11
% Some data:
[lon,lat,z] = meshgrid(-180:3:180,-90:2:90,0:50:1000);
T = 20 - .1*abs(lat) - .01*z + sind(lon);
% Plot dataset:
pcolor3(lon,lat,z,T);
% Add labels:
xlabel('longitude')
ylabel('latitude')
zlabel('elevation (m)')
title('temperature or something')
axis tight
0 个评论
更多回答(3 个)
Sagar
2015-3-15
1 个评论
Chad Greene
2015-3-16
Or similarly,
in = ingeoquad(lat,long,[0 40],[-20 70]);
long(~in) = NaN;
lat(~in) = NaN;
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!