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.

回答(1 个)

Kausthub
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!

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by