subsindex
将对象转换为数组索引
语法
ind = subsindex(A)
说明
MATLAB® 调用 subsindex
以将对象转换为整数索引。如果要使用类的对象作为数组索引,请为您的类定义一个 subsindex
方法。
当 A
是对象时,MATLAB 为表达式 X(A)
调用 ind = subsindex(A)
。subsindex
必须将对象的值以从 0 开始的整数索引形式返回。ind
必须包含 0
到 prod(size(X))-1
范围内的整数值。
MATLAB 分别对表达式中的所有下标调用 subsindex
,例如 X(A,B)
。
扩展功能
版本历史记录
在 R2006a 之前推出