Mercurial > octave
diff scripts/miscellaneous/methods.m @ 26768:3cbc3c741f81
methods.m: Return a column vector for Matlab compatibility.
* methods.m: Make method list a column vector using '(:)' when necessary (only
method lists from Java).
author | Rik <rik@octave.org> |
---|---|
date | Thu, 21 Feb 2019 15:55:43 -0800 |
parents | ebf5ef76f56e |
children | 6e01e5be8de3 |
line wrap: on
line diff
--- a/scripts/miscellaneous/methods.m Thu Feb 21 15:45:21 2019 -0800 +++ b/scripts/miscellaneous/methods.m Thu Feb 21 15:55:43 2019 -0800 @@ -56,6 +56,7 @@ if (isempty (mtds_list)) mtds_str = javaMethod ("getMethods", "org.octave.ClassHelper", obj); mtds_list = ostrsplit (mtds_str, ';'); + mtds_list = mtds_list(:); # return a column vector for compatibility havesigs = true; endif elseif (isjava (obj)) @@ -68,6 +69,7 @@ mtds_str = javaMethod ("getMethods", "org.octave.ClassHelper", obj); end_try_catch mtds_list = strsplit (mtds_str, ';'); + mtds_list = mtds_list(:); # return a column vector for compatibility havesigs = true; else error ("methods: invalid input argument");