フィルターのクリア

Compare of symbolic expression for trigonometric

2 ビュー (過去 30 日間)
jun wei
jun wei 2023 年 2 月 20 日
編集済み: Askic V 2023 年 2 月 20 日
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
  1 件のコメント
Askic V
Askic V 2023 年 2 月 20 日
One thing that comes to my mind is this:
isequal(expand(A), expand(B))

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

採用された回答

Askic V
Askic V 2023 年 2 月 20 日
編集済み: Askic V 2023 年 2 月 20 日
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).

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by