资源简介
matlab开发-landmask。获取与数据相对应的逻辑地块。
代码片段和文件信息
function land = landmask(latlonvarargin)
% landmask returns a logical array describing the landness of
% any given lat/lon arrays. Requires Matlab‘s Mapping Toolbox.
%
% This function uses Matlab‘s built-in coast.mat file with inpolygons
% to determing whether input lat/lons are inside or outside perimeters of
% land areas.
%
%% Syntax
%
% land = landmask(latlon)
% land = landmask(...‘landmass‘)
% land = landmask(...quality)
%
%% Description
%
% land = landmask(latlon) returns logical land array corresponding to
% the dimensions of input lat and lon. 1 is land 0 is not land.
%
% land = landmask(...‘landmass‘) specifies any of the following regions of
% mask:
%
% * ‘Antarctica‘
% * ‘Africa and Eurasia‘
% * ‘North and South America‘
% * ‘Greenland‘
% * ‘Australia‘
% * ‘Baffin Island‘
% * ‘Ellesmere Island‘
% * ‘New Guinea‘
% * ‘Great Britain‘
% * ‘Borneo‘
% * ‘Honshu‘
% * ‘Victoria Island‘
% * ‘Celebes‘
% * ‘New Zealand North Island‘
% * ‘Sumatra‘
% * ‘Madagascar‘
% * ‘Iceland‘
% * ‘New Zealand South Island‘
% * ‘Newfoundland‘
% * ‘Luzon‘
% * ‘Devon Island‘
% * ‘Ireland‘
% * ‘Cuba‘
% * ‘Java‘
% * ‘Mindanao‘
%
% land = landmask(...quality) specifies quality from 0 to 100. This
% option is provided because for large data sets the land mask function
% can take quite some time. For example on my laptop a calculating 180x360 land mask
% for all continents takes about 65 seconds at 100% quality. Default
% quality is 95 which takes about 6 seconds for the same dataset on my laptop.
% The quality setting is only used when calculating the land mask using all
% of the world‘s continents. For single land masses 100% quality is assumed.
%
%
%% Example 1: Is Topeka KS on land?
% % Topeka Kansas is located at (39.06N 95.69W). Is Topeka situatated on
% % land?
%
% TopekaLand = landmask(39.0695.69)
%
%%
% % As it turns out yes Topeka is well grounded. But is it in Australia?
%
% TopekaAustralia = landmask(39.0695.69‘australia‘)
%
%%
% % Zero means nope.
%
%% Example 2: Gridded data
% % Start with some sample gridded data:
%
% [lonlat] = meshgrid(linspace(-179 179 180)...
% linspace(-89.589.5 180));
% z = peaks(180);
%
% worldmap(‘world‘)
% h=pcolorm(latlonz);
%
%%
% % To mask-out the land area of North and South America set all z values
% % corresponding to the land area of these two continents to NaN. Start by
% % deleting the pcolorm surface we plotted above. This calculation may
% % take about 3 to 5 seconds on a modern laptop computer:
%
% delete(h)
% Americas = landmask(latlon‘North and South America‘);
% z(Americas) = NaN;
% h=pcolorm(latlonz);
%
%%
% % To instead mask out all the world‘s oceans set non-land areas to NaN. First
% % we‘ll delete the last pcolorm surface and refresh our z data. Then
% % we‘ll calculate the ocean mask by taking the logical not of the land
% % mask.
% %
% % Using default quality of 95 land mask calculation for our 180x180 grid
% % takes abo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13429 2014-12-05 13:42 landmask\html\landmask_documentation.html
文件 3867 2014-12-05 13:42 landmask\html\landmask_documentation.png
文件 16321 2014-12-05 13:42 landmask\html\landmask_documentation_01.png
文件 16708 2014-12-05 13:42 landmask\html\landmask_documentation_02.png
文件 13777 2014-12-05 13:42 landmask\html\landmask_documentation_03.png
文件 6909 2014-12-05 13:42 landmask\landmask.m
文件 82 2014-12-05 13:42 __MACOSX\landmask\._landmask.m
文件 3976 2014-12-05 13:42 landmask\landmask_documentation.m
文件 82 2014-12-05 13:42 __MACOSX\landmask\._landmask_documentation.m
文件 226757 2014-12-05 13:42 landmask\landmass.png
文件 1311 2014-12-05 13:42 license.txt
- 上一篇:matlab开发-经济调度通用算法解决方案
- 下一篇:matlab开发-spy2m
相关资源
- matlab开发-spy2m
- matlab开发-经济调度通用算法解决方案
- matlab开发-图片加密和解密
- matlab开发-分子通讯粘着剂
- matlab开发-IEEE754二进制表示
- matlab开发-kmvcreditriskmodel违约风险概率
- matlab开发-17电平模块多电平转换器
- matlab开发-Xfoilformatlab
- matlab开发-脑瘤的分割
- matlab开发-车辆网络工具箱支持kvaser和
- matlab开发-CryoSat2DEMs
- matlab开发-BlandAltmanplot
- matlab开发-使用PSO的最佳模糊控制器
- matlab开发-电机磁轴承
- matlab开发-Treynorblackportfoliomanagement模型
- matlab开发-黑白图像增强器
- matlab开发-二维波动方程模拟
- matlab开发-ResponseSpectra
- matlab开发-huashiyiqikeLSTMMATLAB
- matlab开发-HestonOptionPricer
- matlab开发-三相电压调节器
- matlab开发-单级电液伺服阀
-
matlab开发-iau2006 acioba
sedDusingXy系列 - matlab开发-带DPWM0调制的三相逆变器
- matlab开发-Earthquakesimulation
- matlab开发-带MPPT的住宅网格连接PVSys
- matlab开发-pplot
评论
共有 条评论