在matlab中如何实现程序自动识别输入数据的类型
class
Create object or return class of object
Syntax
str = class(object)
obj = class(s, 'class_name')
obj = class(s, 'class_name', parent1, parent2, ...)
obj = class(struct([]), 'class_name', parent1, parent2, ...)
Description
str = class(object) returns a string specifying the class of object.
The following table lists the object class names that can be returned. All except the last one are MATLAB classes.
logicalLogical array of true and false valuescharCharacter arrayint88-bit signed integer arrayuint88-bit unsigned integer arrayint1616-bit signed integer arrayuint1616-bit unsigned integer arrayint3232-bit signed integer arrayuint3232-bit unsigned integer arrayint6464-bit signed integer arrayuint6464-bit unsigned integer arraysingleSingle-precision floating-point number arraydoubleDouble-precision floating-point number arraycellCell arraystructStructure arrayfunction handleArray of values for calling functions indirectly'class_name'Custom MATLAB object class or Java class