⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getcoastline.m

📁 任意边界结构正交曲线网格生成程序
💻 M
字号:
function theResult = getcoastline(self, theCoastlineFile)% seagrid/getcoastline -- Load and plot a coastline.%  getcoastline(self) loads and plots a coastline file%   on behalf of self, a "seagrid" object.  If no%   filename is given, the current coastline filename%   in self is used. % Copyright (C) 1999 Dr. Charles R. Denham, ZYDECO.%  All Rights Reserved.%   Disclosure without explicit written consent from the%    copyright owner does not constitute publication. % Version of 27-Apr-1999 08:48:25.% Updated    11-Dec-2000 15:11:40.if nargout > 0, theResult = self; endif nargin < 1, help(mfilename), return, endif nargin < 2	theCoastlineFile = psget(self, 'itsCoastlineFile');endif ~isempty(theCoastlineFile) & ~any(theCoastlineFile == filesep)	theCoastlineFile = which(theCoastlineFile);endpsset(self, 'itsCoastlineFile', theCoastlineFile)if isempty(theCoastlineFile), return, endload(theCoastlineFile)theCoastlineColor = psget(self, 'itsCoastlineColor');theButtonDownFcn = get(gca, 'ButtonDownFcn');h = findobj('Type', 'line', 'Tag', 'coastline');if any(h), delete(h), endtheProjection = psget(self, 'itsProjection');switch theProjection   % Needs cleaning up.case {'none', 'Geographic'}	theProjection = 'Geographic';	x = lon; y = lat;otherwise	sg_proj(theProjection)	[x, y] = sg_ll2xy(lon, lat);	x = real(x);	y = real(y);endhold onh = plot(x, y, '-', 'Color', theCoastlineColor, ...						'Tag', 'coastline');hold offzoomsafe 0set([gca h], 'ButtonDownFcn', theButtonDownFcn)switch theProjectioncase 'none'	xlabel('Longitude')	ylabel('Latitude')otherwise	xlabel('X')	ylabel('Y')	title([theProjection ' Projection'])endself = doupdate(self);if nargout > 0, theResult = self; end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -