Borrar filtros
Borrar filtros

Creating M_map for Sea Velocity in a specific geographical area

3 visualizaciones (últimos 30 días)
Madison
Madison el 6 de Jun. de 2023
Respondida: Kausthub el 25 de Ag. de 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.

Respuestas (1)

Kausthub
Kausthub el 25 de Ag. de 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!

Categorías

Más información sobre Geographic Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by