sizesMatch
确定地理对象或地图栅格对象与图像或栅格在尺寸上是否兼容
说明
示例
创建一个 GeographicPostingsReference 栅格参考对象。
latlim = [0 90]; lonlim = [-180 180]; rasterSize = [91 361]; R = georefpostings(latlim,lonlim,rasterSize,'ColumnsStartFrom','north')
R =
GeographicPostingsReference with properties:
LatitudeLimits: [0 90]
LongitudeLimits: [-180 180]
RasterSize: [91 361]
RasterInterpretation: 'postings'
ColumnsStartFrom: 'north'
RowsStartFrom: 'west'
SampleSpacingInLatitude: 1
SampleSpacingInLongitude: 1
RasterExtentInLatitude: 90
RasterExtentInLongitude: 360
XIntrinsicLimits: [1 361]
YIntrinsicLimits: [1 91]
CoordinateSystemType: 'geographic'
GeographicCRS: []
AngleUnit: 'degree'
创建一张维度为 91×361 的任意图像(栅格图像)。请确认图像尺寸与地理栅格参考对象兼容。
A = ones(91,361); tf_A = sizesMatch(R,A)
tf_A = logical
1
创建一张不同尺寸的图像。确认此新影像与地理栅格参考对象的尺寸不兼容。
B = ones(90,361); tf_B = sizesMatch(R,B)
tf_B = logical
0
输入参数
图像或栅格,指定为数值数组或栅格对象。
数据类型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | geographic raster object | map raster object
输出参量
指示地理或地图栅格与图像或栅格尺寸兼容的标志,以逻辑标量形式返回。当 R.RasterSize 等于 [size(A,1) size(A,2)] 或 A.RasterSize 时,tf 等于 True。
数据类型: logical
版本历史记录
在 R2013b 中推出
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)