35 DEFUN (syl, 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. For example:\n\
55 syl ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12])\n\
56 @result{} [ -0.50000, -0.66667; -0.66667, -0.50000 ]\n\
63 int nargin = args.
length ();
65 if (nargin != 3 || nargout > 1)
84 int arg_a_is_empty =
empty_arg (
"syl", a_nr, a_nc);
85 int arg_b_is_empty =
empty_arg (
"syl", b_nr, b_nc);
86 int arg_c_is_empty =
empty_arg (
"syl", c_nr, c_nc);
91 if (arg_a_is_empty > 0 && arg_b_is_empty > 0 && arg_c_is_empty > 0)
96 else if (arg_a_is_empty || arg_b_is_empty || arg_c_is_empty)
101 if (a_nr != a_nc || b_nr != b_nc)
106 else if (a_nr != c_nr || b_nr != c_nc)