Creating M_map for Sea Velocity in a specific geographical area
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello,
I am very new to Matlab and am trying to create a map such as teh Shaded Relif example in https://www.eoas.ubc.ca/~rich/map.html#15._bathym. However, I am very unsure how to execute this, pcolor has not been workign teh best and I wanted to use my data to create a m_map using the data linked. If anyone could helpw ith this it would be greatly appriciated, thank you.
댓글 수: 0
답변 (1개)
Kausthub
2023년 8월 25일
Hi Madison,
I understand that you want to create a map like Shaded Relief example and you are not satisfied with pcolor.
Here is article which would be helpful for you to plot maps : Create Maps Using Latitude and Longitude Data - MATLAB & Simulink - MathWorks India
A sample code snippet :
latSeattle = 47.62;
lonSeattle = -122.33;
latAnchorage = 61.20;
lonAnchorage = -149.9;
geoplot([latSeattle latAnchorage],[lonSeattle lonAnchorage],'-*')
geolimits([45 62],[-149 -123])
geobasemap streets
Here are references for other plotting functions that you might useful:
A simple code snippet specific to your example:
% file = 'LateQuaternary_Environment.nc';
file = 'SeaVelocity(E).nc';
info = ncinfo(file);
variableNames = {info.Variables.Name};
disp(variableNames);
longitude = ncread(file, 'longitude');
latitude = ncread(file, 'latitude');
years = ncread(file, 'time');
depth = ncread(file, 'depth');
uo = ncread(file, 'uo');
imagesc(longitude, latitude, uo(:,:,1)')
colorbar
Hope it helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Geographic Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!