diff libinterp/corefcn/sylvester.cc @ 21110:3d0d84305600

Use err_square_matrix_required more widely. * errwarn.h (err_square_matrix_required): Change prototype to take a second argument which is the name of the variable that is not square. * errwarn.cc (err_square_matrix_required): Take second argument NAME and print "NAME must be a square matrix". * balance.cc (Fbalance): Update calling form of err_square_matrix_required. * det.cc (Fdet): Update calling form of err_square_matrix_required. Update pattern in BIST tests to match new output. * eig.cc (Feig): Update calling form of err_square_matrix_required. Update pattern in BIST tests to match new output. * hess.cc (Fhess): Update calling form of err_square_matrix_required. Update pattern in BIST tests to match new output. * inv.cc (Finv): Update calling form of err_square_matrix_required. Update pattern in BIST tests to match new output. * qz.cc (Fqz): Update calling form of err_square_matrix_required. * schur.cc (Fschur): Update calling form of err_square_matrix_required. Update pattern in BIST tests to match new output. * sqrtm.cc (Fsqrtm): Update calling form of err_square_matrix_required. * sylvester.cc (Fsylvester): Update calling form of err_square_matrix_required. Update pattern in BIST tests to match new output. * amd.cc (Famd): Switch from error to err_square_matrix_required. Update pattern in BIST tests to match new output. * ccolamd.cc (Fcsymamd): Switch from error to err_square_matrix_required. * chol.cc (Fcholdelete, Fcholshift): Switch from error to err_square_matrix_required. * colamd.cc (Fsymamd): Switch from error to err_square_matrix_required. * symbfact.cc (Fsymfact): Switch from error to err_square_matrix_required. * symrcm.cc (Fsymrcm): Update calling form of err_square_matrix_required.
author Rik <rik@octave.org>
date Tue, 19 Jan 2016 14:09:56 -0800
parents e39e05d90788
children fcac5dbbf9ed
line wrap: on
line diff
--- a/libinterp/corefcn/sylvester.cc	Tue Jan 19 12:44:54 2016 -0800
+++ b/libinterp/corefcn/sylvester.cc	Tue Jan 19 14:09:56 2016 -0800
@@ -97,10 +97,10 @@
   // Arguments are not empty, so check for correct dimensions.
 
   if (a_nr != a_nc)
-    err_square_matrix_required ("sylvester: input A");
-  else if (b_nr != b_nc)
-    err_square_matrix_required ("sylvester: input B");
-  else if (a_nr != c_nr || b_nr != c_nc)
+    err_square_matrix_required ("sylvester", "A");
+  if (b_nr != b_nc)
+    err_square_matrix_required ("sylvester", "B");
+  if (a_nr != c_nr || b_nr != c_nc)
     err_nonconformant ();
 
   if (isfloat)
@@ -166,7 +166,7 @@
 %!error sylvester (1)
 %!error sylvester (1,2)
 %!error sylvester (1, 2, 3, 4)
-%!error <input A: .* must be a square matrix> sylvester (ones (2,3), ones (2,2), ones (2,2))
-%!error <input B: .* must be a square matrix> sylvester (ones (2,2), ones (2,3), ones (2,2))
+%!error <A must be a square matrix> sylvester (ones (2,3), ones (2,2), ones (2,2))
+%!error <B must be a square matrix> sylvester (ones (2,2), ones (2,3), ones (2,2))
 %!error <nonconformant matrices> sylvester (ones (2,2), ones (2,2), ones (3,3))
 */