Does symbolics give wrong results?

조회 수: 2 (최근 30일)
Kiran Sagar
Kiran Sagar 2015년 12월 10일
답변: Walter Roberson 2015년 12월 11일
I was doing matrix operations using symbolics, I found out to my surprise, that the results where wrong and unrepeatable. Same operations gave different results. For example, I calculated the expression K- K.' to check if the matrix was symmetric. I use this expression on command line twice and I get different results each time.
  댓글 수: 1
Jan
Jan 2015년 12월 10일
Please post the code, which reproduces the problem. Otherwise it is impoosible to guess, what's going on on your computer.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 12월 11일
Symbolic routines are not required to give identical output each time they are called, even if nothing is redefined and no new assume() are added and so on. However, it is expected that the results will be mathematically equivalent (except possibly at some singularities.)
You should try using simplify() on the two different versions

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by