Effacer les filtres
Effacer les filtres

Creating M_map for Sea Velocity in a specific geographical area

3 vues (au cours des 30 derniers jours)
Madison
Madison le 6 Juin 2023
Réponse apportée : Kausthub le 25 Août 2023
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.

Réponses (1)

Kausthub
Kausthub le 25 Août 2023
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!

Catégories

En savoir plus sur Geographic Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by