MATLAB 帮助中心
确定两个 numerictype 对象是否具有等效属性
numerictype
y = isequivalent (T1, T2)
y = isequivalent (T1, T2) 确定 numerictype 对象输入是否具有等效属性,并返回逻辑值 1 (true) 或 0 (false)。如果两个 numerictype 对象描述相同的数据类型,则它们是等效的。
T1, T2
1
true
0
false
示例
全部折叠
使用 isequivalent 确定两个 numerictype 对象是否具有相同的数据类型。
isequivalent
T1 = numerictype(1, 16, 2^-12, 0)
T1 = DataTypeMode: Fixed-point: slope and bias scaling Signedness: Signed WordLength: 16 Slope: 2^-12 Bias: 0
T2 = numerictype(1, 16, 12)
T2 = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 12
isequivalent(T1,T2)
ans = logical 1
尽管 T1 和 T2 的数据类型模式不同,但函数返回 1 (true),因为这两个对象具有相同的数据类型。
T1
T2
要比较的输入,指定为 numerictype 对象。
在 R2014a 中推出
isequal | ispropequal | eq
isequal
ispropequal
eq
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处