[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64995] implement height and width as aliases
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #64995] implement height and width as aliases for rows and columns for matlab compatibility |
Date: |
Fri, 8 Dec 2023 07:20:23 -0500 (EST) |
Follow-up Comment #1, bug#64995 (group octave):
See also bug #50216 but I guess that was submitted when these names were only
used for the table class methods.
One possibility is to define aliases:
diff --git a/libinterp/corefcn/data.cc b/libinterp/corefcn/data.cc
--- a/libinterp/corefcn/data.cc
+++ b/libinterp/corefcn/data.cc
@@ -3008,6 +3008,8 @@ This is equivalent to @code{size (@var{A
return ovl ((octave_value (args(0)).size ())(0));
}
+DEFALIAS (height, rows);
+
/*
%!assert (rows (ones (2,5)), 2)
%!assert (rows (ones (5,2)), 5)
@@ -3053,6 +3055,8 @@ This is equivalent to @code{size (@var{A
return ovl ((octave_value (args(0)).size ())(1));
}
+DEFALIAS (width, columns);
+
DEFUN (sum, args, ,
doc: /* -*- texinfo -*-
@deftypefn {} {@var{y} =} sum (@var{x})
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64995>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/