Why Does eig() Not Throw an Error for Non-Square, Symbolic Input?

Example:
M = [sym(zeros(2));sym('m',[2 2])];
M(1,1) = 1
M = 
eig(M)
ans = 
But filling in the top partition of M does yield the expected result:
M(1:2,1:2) = sym('n',[2 2])
M = 
eig(M)
Error using sym/eig (line 51)
Matrix must be square.
Bug?

1 件のコメント

Christine Tobler
Christine Tobler 2021 年 5 月 20 日
That does seem wrong, I'll pass it along to the right team.

サインインしてコメントする。

 採用された回答

Arthi Sathyamurthi
Arthi Sathyamurthi 2021 年 5 月 28 日

0 投票

This bug has been fixed and the updates will be available in the future release.

2 件のコメント

Paul
Paul 2021 年 5 月 28 日
Link to bug report?
Paul
Paul 2022 年 5 月 25 日
Fixed in 2022a
M = [sym(zeros(2));sym('m',[2 2])];
M(1,1) = 1
M = 
eig(M)
Error using sym/eig
Matrix must be square.

サインインしてコメントする。

その他の回答 (0 件)

製品

リリース

R2021a

タグ

質問済み:

2021 年 5 月 19 日

コメント済み:

2022 年 5 月 25 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by