Home > manopt > tools > multisym.m

# multisym

## PURPOSE Returns the symmetric parts of the matrices in a 3D array

## SYNOPSIS function Y = multisym(X)

## DESCRIPTION ``` Returns the symmetric parts of the matrices in a 3D array

function Y = multisym(X)

Y is a 3D array the same size as X. Each slice Y(:, :, i) is the
symmetric part of the slice X(:, :, i), that is,

Y(:, :, i) = .5*(X(:, :, i) + X(:, :, i).')

Note that we do not take complex conjugates. For this, see multiherm.

## CROSS-REFERENCE INFORMATION This function calls:
• multitransp Transpose the matrix slices of an N-D array (no complex conjugate)
This function is called by:
• essentialfactory Manifold structure to optimize over the space of essential matrices.
• symmetricfactory Returns a manifold struct to optimize over k symmetric matrices of size n
• rotationsfactory Returns a manifold structure to optimize over rotation matrices.
• stiefelfactory Returns a manifold structure to optimize over orthonormal matrices.
• stiefelstackedfactory Stiefel(k, d)^m, represented as matrices of size m*d-by-k.

## SOURCE CODE ```0001 function Y = multisym(X)
0002 % Returns the symmetric parts of the matrices in a 3D array
0003 %
0004 % function Y = multisym(X)
0005 %
0006 % Y is a 3D array the same size as X. Each slice Y(:, :, i) is the
0007 % symmetric part of the slice X(:, :, i), that is,
0008 %
0009 %   Y(:, :, i) = .5*(X(:, :, i) + X(:, :, i).')
0010 %
0011 % Note that we do not take complex conjugates. For this, see multiherm.
0012 %