Wvec function

Vectorization operator that removes zeros

Vectorization operator that removes zeros

Wvec stacks columns of the given matrix to form a vector and removes elements that are zeros.

Wvec(W)

Arguments

  • W: a size (dxd)(dxd) square matrix to be vectorized.

Returns

a vector of length d2nzerosd^2 - n_zeros where nzerosn_zeros is the number of zero entries in the matrix W.

  • Maintainer: Savi Virolainen
  • License: GPL-3
  • Last published: 2025-02-27