资源简介
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开发-能带计算
- matlab开发-FlockingAlgorithm
- matlab开发-MuellerStokesJonesCalculus
- matlab开发-HX711的自定义数据库
- matlab开发-SMOTEBoost
- matlab开发-果蝇优化算法第二版
- matlab开发-多变量决策树
- matlab开发-水轮发电机模型
- matlab开发-交通警告标志识别标签代码
- matlab开发-RUSBoost
- matlab开发-基于遗传算法的机器人运动
- matlab开发-MPU6050加速度陀螺仪
- matlab开发-功率曲线FAsmallscalewindturbi
- matlab开发-NASAJPLDE405开发星历表
- matlab开发-SortinoRatio
- matlab开发-永磁TDC并联电机数学模型
- matlab开发-3相SPWM整流器
- matlab开发-Kilobotswarm控制Matlabarduino
- matlab开发-简单音频播放
- matlab开发-记录文件的绘图仪加速度、
- matlab开发-永磁同步电机PMSM动态数学模
- matlab开发-多目标优化差分进化算法
- matlab开发-随机微分方程解算
- matlab开发-波长调制光谱的二次谐波模
- matlab开发-仿制药生物生理学基础药动
- matlab开发-使用svmrfe选择功能
- matlab开发-KDTreeNearestNeighborandRangeSear
- matlab开发-stlread
- matlab开发-三维图像堆栈查看器
- matlab开发-动态电压恢复器故障dvr
评论
共有 条评论