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?

 채택된 답변

Arthi Sathyamurthi
Arthi Sathyamurthi 2021년 5월 28일

0 개 추천

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

댓글 수: 2

Link to bug report?
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개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

릴리스

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