MATLAB 帮助中心
确定输入是否为布尔值
tf = isboolean(a)
tf = isboolean(T)
tf = isboolean(a) 在 fi 对象 a 的 DataType 属性为 Boolean 时返回 1 (true)。否则,返回 0 (false)。
a
fi
DataType
Boolean
1
true
0
false
示例
tf = isboolean(T) 在 numerictype 对象 T 的 DataType 属性为 Boolean 时返回 1 (true)。否则,返回 0 (false)。
T
numerictype
全部折叠
创建一个 fi 对象,并确定其数据类型是否为 Boolean。
a = fi(pi)
a = 3.1416 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 13
tf = logical 0
a = fi(pi,'DataType','Boolean')
a = 1 DataTypeMode: Boolean
tf = logical 1
创建一个 numerictype 对象,并确定其数据类型是否为 Boolean。
T = numerictype
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 15
T = numerictype('Boolean')
T = DataTypeMode: Boolean
输入 fi 对象,指定为标量、向量、矩阵或多维数组。
数据类型: fi
输入 numerictype 对象,指定为标量。
在 R2008a 中推出
isdouble | isfixed | isfloat | isscaleddouble | isscalingbinarypoint | isscalingslopebias | isscalingunspecified | issingle
isdouble
isfixed
isfloat
isscaleddouble
isscalingbinarypoint
isscalingslopebias
isscalingunspecified
issingle
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处