26 #if defined (HAVE_CONFIG_H)
40 template <
typename Matrix>
131 int nargin = args.length ();
133 if (nargin < 1 || nargin > 2 || nargout > 2)
140 ord = args(1).xstring_value (
"schur: second argument must be a string");
142 bool force_complex =
false;
148 else if (ord ==
"complex")
150 force_complex =
true;
155 char ord_char = (ord.empty () ?
'U' : ord[0]);
157 if (ord_char !=
'U' && ord_char !=
'A' && ord_char !=
'D'
158 && ord_char !=
'u' && ord_char !=
'a' && ord_char !=
'd')
160 warning (
"schur: incorrect ordered schur argument '%s'",
179 if (! force_complex && arg.
isreal ())
214 if (! force_complex && arg.
isreal ())
292 if (args.length () != 2 || nargout > 2)
295 if (! args(0).isnumeric ())
297 if (! args(1).isnumeric ())
299 if (args(0).iscomplex () || args(1).iscomplex ())
300 error (
"rsf2csf: UR and TR must be real matrices");
302 if (args(0).is_single_type () || args(1).is_single_type ())
314 Matrix u = args(0).matrix_value ();
315 Matrix t = args(1).matrix_value ();
octave_idx_type columns(void) const
octave_idx_type rows(void) const
T unitary_matrix(void) const
T schur_matrix(void) const
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
octave_idx_type rows(void) const
bool isnumeric(void) const
octave_idx_type columns(void) const
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
bool is_single_type(void) const
Matrix matrix_value(bool frc_str_conv=false) const
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning(const char *fmt,...)
void error(const char *fmt,...)
void err_square_matrix_required(const char *fcn, const char *name)
void err_wrong_type_arg(const char *name, const char *s)
static octave_value mark_upper_triangular(const Matrix &a)
schur< FloatComplexMatrix > rsf2csf< FloatComplexMatrix, FloatMatrix >(const FloatMatrix &s_arg, const FloatMatrix &u_arg)
schur< RT > rsf2csf(const AT &s, const AT &u)
schur< ComplexMatrix > rsf2csf< ComplexMatrix, Matrix >(const Matrix &s_arg, const Matrix &u_arg)
octave_value::octave_value(const Array< char > &chm, char type) return retval
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.