23 #if defined (HAVE_CONFIG_H) 37 template <
typename Matrix>
44 assert (
a.columns () == n);
128 int nargin = args.length ();
137 ord = args(1).xstring_value (
"schur: second argument must be a string");
139 bool force_complex =
false;
145 else if (ord ==
"complex")
147 force_complex =
true;
152 char ord_char = (ord.empty () ?
'U' : ord[0]);
154 if (ord_char !=
'U' && ord_char !=
'A' && ord_char !=
'D' 155 && ord_char !=
'u' && ord_char !=
'a' && ord_char !=
'd')
157 warning (
"schur: incorrect ordered schur argument '%s'",
289 if (args.length () != 2 ||
nargout > 2)
292 if (! args(0).isnumeric ())
294 if (! args(1).isnumeric ())
296 if (args(0).iscomplex () || args(1).iscomplex ())
297 error (
"rsf2csf: UR and TR must be real matrices");
299 if (args(0).is_single_type () || args(1).is_single_type ())
307 return ovl (
cs.unitary_matrix (),
cs.schur_matrix ());
311 Matrix u = args(0).matrix_value ();
312 Matrix t = args(1).matrix_value ();
317 return ovl (
cs.unitary_matrix (),
cs.schur_matrix ());
static octave_value mark_upper_triangular(const Matrix &a)
OCTINTERP_API void print_usage(void)
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by zero($0/0$)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void error(const char *fmt,...)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
void err_square_matrix_required(const char *fcn, const char *name)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
octave_idx_type columns(void) const
bool is_single_type(void) const
octave_idx_type rows(void) const
schur< FloatComplexMatrix > rsf2csf< FloatComplexMatrix, FloatMatrix >(const FloatMatrix &s_arg, const FloatMatrix &u_arg)
void err_wrong_type_arg(const char *name, const char *s)
With real return the complex result
void warning(const char *fmt,...)
schur< ComplexMatrix > rsf2csf< ComplexMatrix, Matrix >(const Matrix &s_arg, const Matrix &u_arg)
MatrixType matrix_type(void) const
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
schur< RT > rsf2csf(const AT &s, const AT &u)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
bool isnumeric(void) const
Matrix matrix_value(bool frc_str_conv=false) const