The objectToNumMatrix function converts the object {object} into a NumMatrix returning the new Matrix. The {object} may be a List, Vector, Matrix, Structure, Dictionary, or a Directory. If the object is already a NumMatrix, it is returned unchanged. If it is any other type of Matrix (e.g., Matrix), it is converted into a number matrix. A Vector is converted into a Matrix. An object vector containing vectors is converted into a two-dimensional number matrix. Each of these vectors is converted to one row of the number matrix. An element that cannot be converted to a number is converted to zero. An object vector containing object vectors that each contain a vector is converted into a three-dimensional matrix. Each of these object vectors contains one plane of the matrix (first dimension). Each plane is converted into rows as described above for two-dimensional matrices. Several examples are shown below.

If a vector is being converted, an optional rank and the dimensions of the resulting matrix may be specified. If no rank is provided, the vector is converted to a one-dimensional matrix.


The objectToNumMatrix function is used to convert a Vector, List, Matrix, Structure, Directory or Dictionary object to a NumMatrix object.




(objectToNumMatrix object rank dim1 dim2 dim3)

Arguments Name Type Description
Argument:objVector List Matrix Structure Dictionary Directory A Vector, List, Matrix, Structure, Dictionary or Directory Object
Argument:rankInteger Optional. Rank of the resulting matrix (1, 2, 3)
Argument:dim1Integer Optional. Size of the first dimension of the resulting matrix
Argument:dim2Integer Optional. Size of the second dimension of the resulting matrix
Argument:dim3Integer Optional. Size of the third dimension of the resulting matrix


A NumMatrix object



Here are a number of links to Lambda coding examples which contain this instruction in various use cases.


Argument Types

Here are the links to the data types of the function arguments.

Vector NumVector List Matrix
Structure Dictionary Directory Integer
Real Number Complex

Here are also a number of links to functions having arguments with any of these data types.

++ += + /=
/ * -- -=
- abs acos add1
addMethod addi appendWriteln append
apply argument arithmetic asin
associate atan avg badd
balance bdiv binaryInsert binaryNand
binaryNor binaryNot binaryNxor binarySearch
bitToNumberVector bitwiseAnd bitwiseNand bitwiseNor
bitwiseNot bitwiseNxor bitwiseOr bitwiseShiftLeft
bitwiseShiftRight bitwiseXor bmod bmul
boolean c::r cadd car
cdiv cdr char character
class cmod cmul code
compareEQ compareGE compareGT compareLE
compareLT compareNE compare comparison
compile complex conjugate cons
copy cos cosh count
csub date day days360
debugDetective decode defineStructure defstruct
deg deleteRows delete dimension
display divi evalInSyncLocalContext eval
exit exp exportCsv exportSbf
exportTab expt fact fdisplay
fieldsOf fileClose fileCopy fileDisplay
fileErase fileOpen fileReadRecord fileRead
fileResize fileSeek fileWrite filewriteln
findBlock find floor fraction
freeBlock gcd getRecursionCount getTickCount
hashString hour iadd icompareEQ
icompareGE icompareGT icompareLE icompareLT
icompareNE idiv imaginary imod
importCsv importSbf importTab imul
insertRows insert inside inspect
integer isAtom isBitVector isBoolean
isBound isByteVector isCharAlphabetic isCharAlphanumeric
isCharLowercase isCharName isCharNumeric isCharUppercase
isCharWhitespace isChar isCharacter isClass
isComplex isDate isDictionary isDirectory
isEqual isError isEven isExact
isFloatVector isIdentical isInexact isInside
isIntegerVector isInteger isLambda isMatrix
isMember isMoney isNegative isNull
isNumberMatrix isNumberVector isNumber isObjectVector
isObject isOdd isPair isPcodeVector
isPositive isString isStructure isSymbol
isText isType isVector isZero
isub julian kurtosis last
lcm left length lisp
list loadRepository log10 log2
log logbase macroReplace makeDictionary
makeGramMatrix makeQuotedList makeStructure map
mapc max median member
methodsOf mid min minute
mod modi money month
morph muli nadd ncompareEQ
ncompareGE ncompareGT ncompareLE ncompareLT
ncompareNE ndiv new nmod
nmul now nsub number
objectToDictionary objectToDirectory objectToList objectToMatrix
objectToNumMatrix objectToNumVector objectToStructure objectToVector
offset pair parent parse
pi pointer preAllocateFixedMemoryBlocks product
proplist proprecord putprop qt
quote rad random randomize
range rank real refAttributes
refValues ref remProp remove
replace rept resize reverse
right round saveImmediate saveObject
saveRepository second send setAttributes
setBlock setCar setCdr setLastCdr
setq sigmoid sign sin
sinh sizeof skew sleep
sort sql sqrt srandom
stdev stdevp stringToBVector stringToVector
string sub1 subi submit
substitute substring sum sumsqr
super svmRegression system tan
tanh text time type
uniqueInsert var varp vectorBinaryInnerProduct
vectorBipolarInnerProduct vectorCosineInnerProduct vectorCubeInnerProduct vectorDelete
vectorExpInnerProduct vectorFill vectorInnerProduct vectorLogInnerProduct
vectorQuartInnerProduct vectorQuintInnerProduct vectorSigmoidInnerProduct vectorSineInnerProduct
vectorSquareInnerProduct vectorTanInnerProduct vectorTanhInnerProduct writelg
writeln year

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE