Description Usage Arguments Value
The flattened vector contains all elements of the lower triangular part of a symmetric matrix including all diagonal elements. Because any row i of a quadratic matrix contains i elements below the diagonal, including the diagonal element, the flattened vector of an n * n symmetric matrix contains the sum of all natural numbers up to and including n. That length has a closed form and corresponds to n*(n+1)/2. Given the length of the flattened vector, we have a quadratic equation for n, that can be solved. We are only interested in the positive solution which is n = (-1 + √(1+8l))/2
1 | nGetMatDim(pnLenFlatVec)
|
pnLenFlatVec |
length of flattened vector |
nMatDimResult dimension of symmetric matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.