diff -r 868830474750 libinterp/corefcn/data.cc
--- a/libinterp/corefcn/data.cc	Fri Sep 28 11:00:27 2018 +0200
+++ b/libinterp/corefcn/data.cc	Wed Oct 03 00:34:54 2018 +0200
@@ -2803,14 +2803,18 @@ same as @code{nnz} except for some cases
 DEFUN (rows, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn {} {} rows (@var{a})
-Return the number of rows of @var{a}.
+Return the number of rows of @var{a}.  This is equivalent to
+@code{size (@var{a}, 1)}.
 @seealso{columns, size, length, numel, isscalar, isvector, ismatrix}
 @end deftypefn */)
 {
   if (args.length () != 1)
     print_usage ();
 
-  return ovl (args(0).rows ());
+  // This function *must* use size() to determine the desired values to
+  // allow user-defined class overloading.
+
+  return ovl ((octave_value (args(0)).size ())(0));
 }
 
 /*
@@ -2843,14 +2847,18 @@ Return the number of rows of @var{a}.
 DEFUN (columns, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn {} {} columns (@var{a})
-Return the number of columns of @var{a}.
+Return the number of columns of @var{a}.  This is equivalent to
+@code{size (@var{a}, 2)}.
 @seealso{rows, size, length, numel, isscalar, isvector, ismatrix}
 @end deftypefn */)
 {
   if (args.length () != 1)
     print_usage ();
 
-  return ovl (args(0).columns ());
+  // This function *must* use size() to determine the desired values to
+  // allow user-defined class overloading.
+
+  return ovl ((octave_value (args(0)).size ())(1));
 }
 
 DEFUN (sum, args, ,
@@ -3619,14 +3627,19 @@ Logical and character arrays are not con
 DEFUN (isscalar, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn {} {} isscalar (@var{x})
-Return true if @var{x} is a scalar.
+Return true if @var{x} is a scalar, i.e., @code{size (@var{x})} returns
+@code{[1 1]}.
 @seealso{isvector, ismatrix}
 @end deftypefn */)
 {
   if (args.length () != 1)
     print_usage ();
 
-  return ovl (args(0).numel () == 1);
+  // This function *must* use size() to determine the desired values to be
+  // compatible with Matlab and to allow user-defined class overloading.
+  Matrix sz = octave_value (args(0)).size ();
+
+  return ovl (sz.numel () == 2 && sz(0) == 1 && sz(1) == 1);
 }
 
 /*
@@ -3661,9 +3674,11 @@ consequence a 1x1 array, or scalar, is a
   if (args.length () != 1)
     print_usage ();
 
-  dim_vector sz = args(0).dims ();
-
-  return ovl (sz.ndims () == 2 && (sz(0) == 1 || sz(1) == 1));
+  // This function *must* use size() to determine the desired values to be
+  // compatible with Matlab and to allow user-defined class overloading.
+  Matrix sz = octave_value (args(0)).size ();
+
+  return ovl (sz.numel () == 2 && (sz(0) == 1 || sz(1) == 1));
 }
 
 /*
@@ -3689,16 +3704,19 @@ consequence a 1x1 array, or scalar, is a
 DEFUN (isrow, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn {} {} isrow (@var{x})
-Return true if @var{x} is a row vector 1xN with non-negative N.
+Return true if @var{x} is a row vector, i.e., @code{size (@var{x})} returns
+@code{[1 N]} with non-negative N.
 @seealso{iscolumn, isscalar, isvector, ismatrix}
 @end deftypefn */)
 {
   if (args.length () != 1)
     print_usage ();
 
-  dim_vector sz = args(0).dims ();
-
-  return ovl (sz.ndims () == 2 && sz(0) == 1);
+  // This function *must* use size() to determine the desired values to be
+  // compatible with Matlab and to allow user-defined class overloading.
+  Matrix sz = octave_value (args(0)).size ();
+
+  return ovl (sz.numel () == 2 && sz(0) == 1);
 }
 
 /*
@@ -3733,16 +3751,19 @@ Return true if @var{x} is a row vector 1
 DEFUN (iscolumn, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn {} {} iscolumn (@var{x})
-Return true if @var{x} is a column vector Nx1 with non-negative N.
+Return true if @var{x} is a column vector, i.e., @code{size (@var{x})} returns
+@code{[N 1]} with non-negative N.
 @seealso{isrow, isscalar, isvector, ismatrix}
 @end deftypefn */)
 {
   if (args.length () != 1)
     print_usage ();
 
-  dim_vector sz = args(0).dims ();
-
-  return ovl (sz.ndims () == 2 && sz(1) == 1);
+  // This function *must* use size() to determine the desired values to be
+  // compatible with Matlab and to allow user-defined class overloading.
+  Matrix sz = octave_value (args(0)).size ();
+
+  return ovl (sz.numel () == 2 && sz(1) == 1);
 }
 
 /*
@@ -3777,16 +3798,19 @@ Return true if @var{x} is a column vecto
 DEFUN (ismatrix, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn {} {} ismatrix (@var{a})
-Return true if @var{a} is a 2-D array.
+Return true if @var{a} is a 2-D array, i.e., @code{size (@var{a})} returns
+@code{[M N]} with non-negative M and N.
 @seealso{isscalar, isvector, iscell, isstruct, issparse, isa}
 @end deftypefn */)
 {
   if (args.length () != 1)
     print_usage ();
 
-  dim_vector sz = args(0).dims ();
-
-  return ovl (sz.ndims () == 2 && sz(0) >= 0 && sz(1) >= 0);
+  // This function *must* use size() to determine the desired values to be
+  // compatible with Matlab and to allow user-defined class overloading.
+  Matrix sz = octave_value (args(0)).size ();
+
+  return ovl (sz.numel () == 2 && sz(0) >= 0 && sz(1) >= 0);
 }
 
 /*
@@ -3820,16 +3844,19 @@ Return true if @var{a} is a 2-D array.
 DEFUN (issquare, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn {} {} issquare (@var{x})
-Return true if @var{x} is a square matrix.
+Return true if @var{x} is a square matrix, i.e., @code{size (@var{x})} returns
+@code{[N N]} with non-negative N.
 @seealso{isscalar, isvector, ismatrix, size}
 @end deftypefn */)
 {
   if (args.length () != 1)
     print_usage ();
 
-  dim_vector sz = args(0).dims ();
-
-  return ovl (sz.ndims () == 2 && sz(0) == sz(1));
+  // This function *must* use size() to determine the desired values to
+  // allow user-defined class overloading.
+  Matrix sz = octave_value (args(0)).size ();
+
+  return ovl (sz.numel () == 2 && sz(0) == sz(1));
 }
 
 /*
