rot2mat function

Get back a symmetric square matrix based on his rotated row-wised version.

Get back a symmetric square matrix based on his rotated row-wised version.

Get back a symmetric square matrix based on his rotated row-wised version. The rotated form of the input is such each column correspond to a diagonal, where the first column is the main diagonal and next ones are the upper/lower-diagonal. To match dimension, last element of these columns are discarded.

rot2mat(R)

Arguments

  • R: Rotated matrix.

Returns

Band square matrix.

Examples

D0 = 1:5; D1 = c(0,1,0,0); D2 = rep(2,3); A = rot2mat(cbind(D0,c(D1,0),c(D2,0,0))) A mat2rot(rot2mat(cbind(D0,c(D1,0),c(D2,0,0))))
  • Maintainer: Vivien Goepp
  • License: GPL-3
  • Last published: 2022-06-09