Reputation: 123
I get the following error message when attempting to create the 3x3 Matrix T in Maple where:
T:= Matrix([[0,1,0],[a,1,0],[b,1,9]])
and the error message
Error, (in Matrix) this entry is too tall or too short: 1
Note that the with(LinearAlgebra)
package is activated. I do not understand why the central coordinate of the matrix is the only one to get error message, any idea what could be wrong?
Upvotes: 1
Views: 646
Reputation: 7271
The code snippet, as you've shown it, runs fine. Here it is, producing the expected output.
restart;
with(LinearAlgebra):
T:= Matrix([[0,1,0],[a,1,0],[b,1,9]]);
[0 1 0]
[ ]
T := [a 1 0]
[ ]
[b 1 9]
What's probably gone wrong is that either the name a or b has previously been assigned a value (possibly a Vector, or Matrix) and that you call thus denotes an attempt to flatten that. But then there'd be a mismatch with the scalars 1 and 0 in the same row or column.
For example,
restart;
with(LinearAlgebra):
a := Vector([1,2]):
Matrix([[0,1,0],[a,1,0],[b,1,9]]);
Error, (in Matrix) this entry is too tall or too short: 1
So, are either a or b assigned with non-scalar values? If so, then try unassigning them first, or reconsider what you're trying to accomplish.
Upvotes: 1