isequal polynomials, why matlab cannot show matrix polynomials are equal?

Merry Christmas to all matlab folks. I have a question, can anyone tell me why i get the following result, even though the to matrix polynomials are equal ?

8 commentaires

Thats a good work around the issue. Doing this results in zero.
Thanks
What is the value of s? Can you give us code? We can run code but cannot run a screenshot.
is it possible that those were matrices of transfer functions? If so perhaps some details were different such as input delays. A mat file would have helped.
I will gladly send code, but the first answer from Walter was very helpfull, since i only needed to ensure that the two matrices were equal.
I think the main problem was that one matrix (H) had a term like: 2(s+2)
and the other (HH) would have an equivalent term like: 2s+4
so isequal were not able to sort these, but when subtracting H - HH the issue was no longer.
Btw kudos to u two guys for answering so many matlab questions, ive seen youre names often when looking at matlab answers! :)
Ah, yes, isequal of symbolic checks for whether they are expressed the same way.
isAlways(H == HH)
Okay, I see. So "isalways" will check for all possible ways the symbolic expression can be formulated.
I am curious, are u (walter), a matlab enthusiast or hired by matlab ?
I have never worked for Mathworks; I am a volunteer.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by