Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

strange behaviour

MatrixQ has a strange behaviour:

"MatrixQ[expr] gives True if expr is a list of lists that can represent
a \ matrix, and gives False otherwise. MatrixQ[expr, test] gives True
only if \ test yields True when applied to each of the matrix elements
in expr."

MatrixQ[{{},{}}] gives True because its argument is a list of lists of
equal length. No problem.

NumberQ[{}] gives False because {} is not a number. I can understand

MatrixQ[{{},{}},NumberQ] gives True, and this seems to me in
contradiction with the definition of MatrixQ[expr, test]

Can somebody explain this to my stupid mind?


Jean-Marie THOMAS
Conseil et Audit en Ingenierie de Calcul
+33 (0)3 88 32 93 64

  • Prev by Date: Re: List Manipulation
  • Next by Date: Fuzzy Logic Pack
  • Prev by thread: Bivariate Integrations/Assumptions error/
  • Next by thread: Re: strange behaviour