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

1 vue (au cours des 30 derniers jours)
Paul
Paul le 19 Mai 2021
Commenté : Paul le 25 Mai 2022
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 commentaire
Christine Tobler
Christine Tobler le 20 Mai 2021
That does seem wrong, I'll pass it along to the right team.

Connectez-vous pour commenter.

Réponse acceptée

Arthi Sathyamurthi
Arthi Sathyamurthi le 28 Mai 2021
This bug has been fixed and the updates will be available in the future release.
  2 commentaires
Paul
Paul le 28 Mai 2021
Link to bug report?
Paul
Paul le 25 Mai 2022
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by