【问题标题】:Error, (in Matrix) this entry is too tall or too short: 1 when attempting to define Matrix in Maple错误,(在矩阵中)此条目太高或太短:1 尝试在 Maple 中定义矩阵时
【发布时间】:2020-04-04 17:09:22
【问题描述】:

尝试在 Maple 中创建 3x3 矩阵 T 时收到以下错误消息 其中:

T:= Matrix([[0,1,0],[a,1,0],[b,1,9]])

和错误信息

Error, (in Matrix) this entry is too tall or too short: 1

请注意,with(LinearAlgebra) 包已激活。我不明白为什么矩阵的中心坐标是唯一收到错误消息的,知道可能是什么问题吗?

【问题讨论】:

    标签: matrix vector linear-algebra dimensions maple


    【解决方案1】:

    正如您所展示的,代码 sn-p 运行良好。就是这样,产生了预期的输出。

    restart;
    with(LinearAlgebra):
    T:= Matrix([[0,1,0],[a,1,0],[b,1,9]]);
    
                        [0    1    0]
                        [           ]
                   T := [a    1    0]
                        [           ]
                        [b    1    9]
    

    可能出了问题的是名称 ab 之前已被分配了一个值(可能是向量或矩阵),因此您调用的名称表示一个试图把它弄平。但是在同一行或同一列中的标量 1 和 0 会不匹配。

    例如,

    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
    

    那么,是否为 ab 分配了非标量值?如果是这样,请先尝试取消分配它们,或者重新考虑您要完成的任务。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多