35 DEFUN (sylvester, args, nargout,
37 @deftypefn {Built-in Function} {@var{X} =} syl (@var{A}, @var{B}, @var{C})\n\
38 Solve the Sylvester equation\n\
51 using standard @sc{lapack} subroutines.\n\
57 sylvester ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12])\n\
58 @result{} [ 0.50000, 0.66667; 0.66667, 0.50000 ]\n\
65 int nargin = args.
length ();
67 if (nargin != 3 || nargout > 1)
86 int arg_a_is_empty =
empty_arg (
"sylvester", a_nr, a_nc);
87 int arg_b_is_empty =
empty_arg (
"sylvester", b_nr, b_nc);
88 int arg_c_is_empty =
empty_arg (
"sylvester", c_nr, c_nc);
94 if (arg_a_is_empty > 0 && arg_b_is_empty > 0 && arg_c_is_empty > 0)
99 else if (arg_a_is_empty || arg_b_is_empty || arg_c_is_empty)
109 else if (b_nr != b_nc)
114 else if (a_nr != c_nr || b_nr != c_nc)
void gripe_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
octave_idx_type rows(void) const
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
OCTINTERP_API void print_usage(void)
ComplexMatrix Sylvester(const ComplexMatrix &a, const ComplexMatrix &b, const ComplexMatrix &c)
#define DEFUN(name, args_name, nargout_name, doc)
int empty_arg(const char *, octave_idx_type nr, octave_idx_type nc)
void gripe_square_matrix_required(const char *name)
octave_idx_type columns(void) const
bool is_complex_type(void) const
octave_idx_type length(void) const
Matrix matrix_value(bool frc_str_conv=false) const
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
bool is_single_type(void) const
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))