direct.sum | R Documentation |
This function computes the direct sum of two arrays. The arrays can be numerical vectors or matrices. The result ia the block diagonal matrix.
direct.sum( x, y )
x |
a numeric matrix or vector |
y |
a numeric matrix or vector |
If either \bf{x} or y is a vector, it is converted to a matrix. The result is a block diagonal matrix ≤ft\lbrack {\begin{array}{cc} {\bf{x}} & {\bf{0}} \\ {\bf{0}} & {\bf{y}} \\ \end{array}} \right\rbrack.
A numeric matrix.
Frederick Novomestky fnovomes@poly.edu, Kurt Hornik Kurt.Hornik@wu-wien.ac.at
Magnus, J. R. and H. Neudecker (1999) Matrix Differential Calculus with Applications in Statistics and Econometrics, Second Edition, John Wiley.
x <- matrix( seq( 1, 4 ) ) y <- matrix( seq( 5, 8 ) ) print( direct.sum( x, y ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.