m_map工具箱配置
我是水怪的哥
2022年04月17日 10:12
收录于文集
共31篇

MATLAB配置m_map过程

(1)下载m_map工具,百度搜索m_map。

进入官网选择下载

(2)将压缩包解压缩后,将m_map这个文件夹复制到你的matlab安装目录下的toolbox里面

把解压缩文件放入matlab安装目录下

(3)配置m_map,运行matlab,点击set path→add folder→找到你刚刚复制的m_map,选择,然后保存,然后关闭

m_map配置

(4)运行测试代码

subplot(211);

Slongs=[-100 0;-75 25;0 45; 25 145;45 100;145 295;100 295];

Slats= [   8 80;-80  8;  8  80;-80   8; 8   80;-80   0; 0 80];

for l=1:7

    m_proj('sinusoidal&#​39;,'long&#​39;,Slongs(l,:),'lat&#​39;,Slats(l,:));

    m_grid('fontsize&#​39;,6,'xticklabels&#​39;,[],'xtick&#​39;,[-180:30:360],...

                'ytick&#​39;,[-80:20:80],'yticklabels&#​39;,[],'linest&#​39;,'-&#​39;,'color&#​39;,[.7 .7 .7]);

    m_coast('patch&#​39;,'g&#​39;);

end

xlabel('Interrupted Sinusoidal Projection of World Oceans');

% In order to see all the maps we must undo the axis limits set by m_grid calls:

set(gca,'xlimmode&#​39;,'auto&#​39;,'ylimmode&#​39;,'auto&#​39;);

subplot(212);

Slongs=[-100 43;-75 20; 20 145;43 100;145 295;100 295];

Slats= [  0  90;-90  0;-90   0; 0  90;-90   0;  0  90];

for l=1:6

    m_proj('mollweide&#​39;,'long&#​39;,Slongs(l,:),'lat&#​39;,Slats(l,:));

    m_grid('fontsize&#​39;,6,'xticklabels&#​39;,[],'xtick&#​39;,[-180:30:360],...

                'ytick&#​39;,[-80:20:80],'yticklabels&#​39;,[],'linest&#​39;,'-&#​39;,'color&#​39;,'k&#​39;)

    m_coast('patch&#​39;,[.6 .6 .6]);

end

xlabel('Interrupted Mollweide Projection of World Oceans');

set(gca,'xlimmode&#​39;,'auto&#​39;,'ylimmode&#​39;,'auto&#​39;);

运行结果:

欢迎与我交流!1565903211