[bug #68172] any() and all() should work only on numeric or logical args

Nicholas Jankowski <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Follow-up Comment #2, bug #68172 (group octave):

just to document compatability, matlab 2025a produces errors for structs and
classdefs:


>> b = struct("a",1,"b",2);

>> any(b)
Error using any
Invalid data type. First argument must be numeric or logical.
 
>> all(b)
Error using all
Invalid data type. First argument must be numeric or logical.
 
>> a = [b,b];

>> any(a)
Error using any
Invalid data type. First argument must be numeric or logical.
 
>> all(a)
Error using all
Invalid data type. First argument must be numeric or logical.

>> c = inputParser;

>> any(c)
Error using any
Invalid data type. First argument must be numeric or logical.
 
>> all(c)
Error using all
Invalid data type. First argument must be numeric or logical.
 
>> d = [c,c];

>> any(d)
Error using any
Invalid data type. First argument must be numeric or logical.
 
>> all(d)
Error using all
Invalid data type. First argument must be numeric or logical.





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68172>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCacLr/AAKCRCqLAuaBUf3
TruiAQC2TwkCu7LQUHb873r8Ygo3D7pdqyU4G6UDlQ6tEf6flAEAp8vbxj83uVe7
5FxlKvPg96cWyndUC7vwVGZ5/ODH/A0=
=J5Kf
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.