How to transform a lower triangular matrix to a vector ? l used the function vec( ) and it doesn't work l got this code error ERROR: ArgumentError: Triangular matrix must have two dimensions in similar at linalg/triangular.jl:27 in reshape at abstractarray.jl:213 in vec at abstractarraymath.jl:14
On Thursday, April 25, 2013 at 4:46:43 PM UTC+2, Theodore Papamarkou wrote: > > Is there a neat and efficient way to solve the following problem in Julia? > Assume a vector that contains n*(n+1)/2 elements. The aim is to pack these > elements into the diagonal and upper right triangular portion of an n*n > matrix. For example, the vector 1:10 would be transformed to the 4*4 matrix > 1 2 3 4 > 0 5 6 7 > 0 0 8 9 > 0 0 0 10 > I am not so familiar with handling of symmetric and triangular matrices in > Julia. Is there some built-in support for this? >