meshm - R parameter

1 回表示 (過去 30 日間)
Shaula Garibbo
Shaula Garibbo 2020 年 1 月 30 日
I have a bathymetry netCDF variable that is not square (3027x8796, where the depth values correspond to (latitude x longitude).
The meshm documentation explains what different forms the 'R' parameter can take, and I think I need the 'referencing matrix' version, where:
If R is a referencing matrix, it must be 3-by-2 and transform raster row and column indices to/from geographic coordinates according to:
[lon lat] = [row col 1] * R
I sort of follow the principle, but I have no idea how to construct this (perhaps it's been a long day), and the documentation doesn't give an example of what it means.
I think this is what is causing the white space I'm seeing in my 'map':
axesm('mercator','MapLonLimit',[-17.7063 18.9396], 'MapLatLimit',[65.7229 78.3313]);
% set(gca, 'xlim', [-17.7063 18.9396]); set(gca, 'ylim', [65.7229 78.3313]);
[lattrkgc,lontrkgc] = track2(lat1,lon1,lat2,lon2);
[lattrkrh,lontrkrh] = track2('rh',lat1,lon1,lat2,lon2);
R = [3027/13 78.3313 -17.7063];
meshm(bathy, R);
demcmap(bathy);
plotm(lattrkgc, lontrkgc, 'r');
plotm(lattrkrh, lontrkrh, 'g');
Producing: untitled.jpg
What's the best way of getting rid of this white space (and also getting axes labels, as the set() command doesn't seem to be achieving anything other than squashing the map despite having matching limits). Thanks.

回答 (0 件)

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by