How to do matrix equality testing for symbols?
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
In the documentation I found this example.
A = [1+i 3 2 4+i];
B = [1 3+i 2 4+i];
A == B
The result is:
ans = 1x4 logical array
0 0 1 1
How can I make the == operator work for symbols? I tried below example:
syms a b [3 1] real
r1 = a*b';
r2 = b*a';
r1 == r2
and the result is:

Is it possible to compare symbol expressions?
댓글 수: 0
답변 (1개)
madhan ravi
2020년 6월 17일
syms a b [3 1] real
assume([a, b] > 0)
r1 = a*b';
r2 = b*a';
isAlways(r1 == r2) % indeed with a warning
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!