How can I increase coastal resolution with M_map?
    조회 수: 11 (최근 30일)
  
       이전 댓글 표시
    
Hi all,
I am using the code provided as an example to get familair with M_map (see below). However when I ran it, an error(ish) message appeared (see below) which doesn't allowed me to have a full resolution of the coastal are. I already double checked and m_gshhs_f (and all others) are included in the folder. Can anyone help me please?
Warning: Coastline file C:\Matlab_download\m_map1.4\m_map/data/gshhs_f.b not found \n(Have you installed it? See the M_Map
User's Guide for details)\n ---Using default coastline instead 
> In mu_coast>get_coasts (line 476)
In mu_coast (line 101)
In m_gshhs (line 118)
In m_gshhs_f (line 28)
In untitled (line 9) 
close all
clear all
clc
% add path to TelemacTolls functions (i.e. to read in telemac files into MATLAB):
addpath ('C:\Matlab_download\m_map1.4\m_map\');
m_proj('UTM','long',[-72 -68],'lat',[40 44]);
    m_gshhs_i('color','k');
    m_grid('box','fancy','tickdir','in');
    m_ruler(1.2,[.5 .8]);
    % fake up a trackline
    lons=[-71:.1:-67];
    lats=60*cos((lons+115)*pi/180);
    dates=datenum(1997,10,23,15,1:41,zeros(1,41));
    m_track(lons,lats,dates,'ticks',0,'times',4,'dates',8,...
           'clip','off','color','r','orient','upright');
    m_northarrow(-68.5,43.4,.4,'type',2);
댓글 수: 1
답변 (1개)
  Aleksei
 2022년 12월 9일
        The first solution I see is:
1) add folder with subfolders: addpath(genpath('C:\Matlab_download\m_map1.4\m_map\'));
your gshhs files are located in the subfolder 'data', but by addpath you add only files in the folder m_map
2) if you want your 'addpath' having permanent effect - don't forget the 'savepath' command  
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Search Path에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!