MATLAB 帮助中心
确定 DataSpecification 对象的值域是否包含指定值
DataSpecification
bool = contains(dataspec, value)
bool = contains(dataspec, value) 返回布尔值,指示 fixed.DataSpecification 对象 dataspec 的值域是否包含值 value。
bool
dataspec
value
fixed.DataSpecification
示例
全部折叠
使用 contains 函数确定 fixed.DataSpecification 对象是否包含指定值。
contains
dataspec = fixed.DataSpecification('int8', 'Intervals', {-1,1})
dataspec = fixed.DataSpecification with properties: DataTypeStr: 'int8' Intervals: [-1,1] MandatoryValues: <empty> Complexity: 'real' Dimensions: 1
确定 dataspec 是否包含值 0。
bool = contains(dataspec, 0)
bool = logical 1
输入 fixed.DataSpecification 对象。
要在 fixed.DataSpecification 对象中检查的值,指定为标量或向量。
数据类型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
fi
fixed.DataSpecification 对象是否包含该值,以布尔值形式返回。
如果 value 参量是向量,则输出是相同长度的布尔向量。
在 R2019b 中推出
fixed.DataSpecification | applyOnRootInport
applyOnRootInport
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处