#include <string>
#include "CmplxSCHUR.h"
#include "dbleSCHUR.h"
#include "fCmplxSCHUR.h"
#include "floatSCHUR.h"
#include "defun-dld.h"
#include "error.h"
#include "gripes.h"
#include "oct-obj.h"
#include "utils.h"
Go to the source code of this file.
Functions | |
DEFUN_DLD (schur, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{S} =} schur (@var{A})\n\ @deftypefnx {Loadable Function} {@var{S} =} schur (@var{A}, \"real\")\n\ @deftypefnx {Loadable Function} {@var{S} =} schur (@var{A}, \"complex\")\n\ @deftypefnx {Loadable Function} {@var{S} =} schur (@var{A}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{U}, @var{S}] =} schur (@var{A}, @dots{})\n\ @cindex Schur decomposition\n\ Compute the Schur@tie{}decomposition of @var{A}\n\ @tex\n\ $$\n\ S = U^T A U\n\ $$\n\ @end tex\n\ @ifnottex\n\ \n\ @example\n\ @code{@var{S} = @var{U}' * @var{A} * @var{U}}\n\ @end example\n\ \n\ @end ifnottex\n\ where @var{U} is a unitary matrix\n\ @tex\n\ ($U^T U$ is identity)\n\ @end tex\n\ @ifnottex\n\ (@code{@var{U}'* @var{U}} is identity)\n\ @end ifnottex\n\ and @var{S} is upper triangular. The eigenvalues of @var{A} (and @var{S})\n\ are the diagonal elements of @var{S}. If the matrix @var{A}\n\ is real, then the real Schur@tie{}decomposition is computed, in which the\n\ matrix @var{U} is orthogonal and @var{S} is block upper triangular\n\ with blocks of size at most\n\ @tex\n\ $2 \\times 2$\n\ @end tex\n\ @ifnottex\n\ @code{2 x 2}\n\ @end ifnottex\n\ along the diagonal. The diagonal elements of @var{S}\n\ (or the eigenvalues of the\n\ @tex\n\ $2 \\times 2$\n\ @end tex\n\ @ifnottex\n\ @code{2 x 2}\n\ @end ifnottex\n\ blocks, when appropriate) are the eigenvalues of @var{A} and @var{S}.\n\ \n\ The default for real matrices is a real Schur@tie{}decomposition.\n\ A complex decomposition may be forced by passing the flag \"complex\".\n\ \n\ The eigenvalues are optionally ordered along the diagonal according to\n\ the value of @var{opt}. @code{@var{opt} = \"a\"} indicates that all\n\ eigenvalues with negative real parts should be moved to the leading\n\ block of @var{S}\n\ (used in @code{are}), @code{@var{opt} = \"d\"} indicates that all eigenvalues\n\ with magnitude less than one should be moved to the leading block of @var{S}\n\ (used in @code{dare}), and @code{@var{opt} = \"u\"}, the default, indicates\n\ that no ordering of eigenvalues should occur. The leading @var{k}\n\ columns of @var{U} always span the @var{A}-invariant\n\ subspace corresponding to the @var{k} leading eigenvalues of @var{S}.\n\ \n\ The Schur@tie{}decomposition is used to compute eigenvalues of a\n\ square matrix, and has applications in the solution of algebraic\n\ Riccati equations in control (see @code{are} and @code{dare}).\n\ @seealso{rsf2csf}\n\ @end deftypefn") | |
DEFUN_DLD (rsf2csf, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Function File} {[@var{U}, @var{T}] =} rsf2csf (@var{UR}, @var{TR})\n\ Convert a real, upper quasi-triangular Schur@tie{}form @var{TR} to a complex,\n\ upper triangular Schur@tie{}form @var{T}.\n\ \n\ Note that the following relations hold:\n\ \n\ @tex\n\ $UR \\cdot TR \\cdot {UR}^T = U T U^{\\dagger}$ and\n\ $U^{\\dagger} U$ is the identity matrix I.\n\ @end tex\n\ @ifnottex\n\ @xcode{@var{UR} * @var{TR} * @var{UR}' = @var{U} * @var{T} * @var{U}'} and\n\ @code{@var{U}' * @var{U}} is the identity matrix I.\n\ @end ifnottex\n\ \n\ Note also that @var{U} and @var{T} are not unique.\n\ @seealso{schur}\n\ @end deftypefn") | |
template<class Matrix > | |
static octave_value | mark_upper_triangular (const Matrix &a) |
DEFUN_DLD | ( | schur | , | |
args | , | |||
nargout | ||||
) |
Definition at line 60 of file schur.cc.
References arg(), octave_value::columns(), octave_value::complex_matrix_value(), error(), error_state, octave_value::float_complex_matrix_value(), octave_value::float_matrix_value(), gripe_square_matrix_required(), gripe_wrong_type_arg(), octave_value::is_numeric_type(), octave_value::is_real_type(), octave_value::is_single_type(), mark_upper_triangular(), octave_value::matrix_value(), print_usage(), octave_value::rows(), ComplexSCHUR::schur_matrix(), SCHUR::schur_matrix(), FloatComplexSCHUR::schur_matrix(), FloatSCHUR::schur_matrix(), ComplexSCHUR::unitary_matrix(), SCHUR::unitary_matrix(), FloatComplexSCHUR::unitary_matrix(), FloatSCHUR::unitary_matrix(), and warning().
DEFUN_DLD | ( | rsf2csf | , | |
args | , | |||
nargout | ||||
) |
Definition at line 297 of file schur.cc.
References error(), error_state, gripe_wrong_type_arg(), print_usage(), ComplexSCHUR::schur_matrix(), FloatComplexSCHUR::schur_matrix(), ComplexSCHUR::unitary_matrix(), and FloatComplexSCHUR::unitary_matrix().
static octave_value mark_upper_triangular | ( | const Matrix & | a | ) | [static] |
Definition at line 42 of file schur.cc.
References Array< T >::columns(), octave_value::matrix_type(), Array< T >::rows(), and MatrixType::Upper.
Referenced by DEFUN_DLD().