Filter löschen
Filter löschen

Compare of symbolic expression for trigonometric

2 Ansichten (letzte 30 Tage)
jun wei
jun wei am 20 Feb. 2023
Bearbeitet: Askic V am 20 Feb. 2023
I am trying to compare symbolic expressions i.e A=2*sin(x)*cos(x),B=simplify(A)=sin(2*x)
isequal(A,B)
but it return false.
Any ways to compare symbolic expression for trigo iden

Akzeptierte Antwort

Askic V
Askic V am 20 Feb. 2023
Bearbeitet: Askic V am 20 Feb. 2023
Perhaps, this is the way to go with sym expressions:
isAlways(A == B)
isAlways(cond) checks if the condition cond is valid for all possible values of the symbolic variables in cond. When verifying cond, the isAlways function considers all assumptions on the variables in cond. If the condition holds, isAlways returns logical 1 (true). Otherwise it returns logical 0 (false).

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by