Last data update: 2014.03.03

R: Direct sum of two arrays
%s%R Documentation

Direct sum of two arrays

Description

This function computes the direct sum of two arrays. The arrays can be numerical vectors or matrices. The result ia the block diagonal matrix.

Usage

x%s%y

Arguments

x

a numeric matrix or vector

y

a numeric matrix or vector

Details

If either f{x} or y is a vector, it is converted to a matrix. The result is a block diagonal matrix ≤ft[ {egin{array}{*{20}c} {f{x}} & {f{0}} \ {f{0}} & {f{y}} \ end{array}} ight].

Value

A numeric matrix.

Author(s)

Frederick Novomestky fnovomes@poly.edu, Kurt Hornik Kurt.Hornik@wu-wien.ac.at

References

Magnus, J. R. and H. Neudecker (1999) Matrix Differential Calculus with Applications in Statistics and Econometrics, Second Edition, John Wiley.

Examples

x <- matrix( seq( 1, 4 ) )
y <- matrix( seq( 5, 8 ) )
print( x %s% y )

Results