MathTop

inttovec 函数

返回给定长度的非负整数向量序列中指定零基编号对应的向量。

语法

  • combinat:-inttovec(index, length)
  • combinat[inttovec](index, length)
  • inttovec(index, length)

参数与选项

index零基规范向量编号。
length返回向量的长度。

示例

  1. 整数解码为向量combinat:-inttovec(6, 3)返回 [1, 0, 1]。