Determine if two numerictype objects have equivalent properties
numerictype
y = isequivalent (T1, T2)
example
y = isequivalent (T1, T2) determines whether the numerictype object inputs have equivalent properties and returns a logical 1 (true) or 0 (false). Two numerictype objects are equivalent if they describe the same data type.
T1, T2
1
true
0
false
collapse all
Use isequivalent to determine if two numerictype objects have the same data type.
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
Although the Data Type Mode is different for T1 and T2, the function returns 1 (true) because the two objects have the same data type.
T1
T2
Inputs to be compared, specified as numerictype objects.
eq | isequal | ispropequal
eq
isequal
ispropequal
You have a modified version of this example. Do you want to open this example with your edits?