필터 지우기
필터 지우기

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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by