Learn R Programming

inteq (version 1.0)

diag_ext: Internal function to generate diagonal matrices with possibly an offset with possibly mirrored diagonal

Description

Internal function to generate diagonal matrices with possibly an offset with possibly mirrored diagonal

Usage

diag_ext(x, index, mirror = FALSE)

Value

diagonal matrix

Arguments

x

vector

index

integer offset index for the diagonal (can be negative)

mirror

logical for whether to mirror at the diagonal