Does symbolics give wrong results?

2 Ansichten (letzte 30 Tage)
Kiran Sagar
Kiran Sagar am 10 Dez. 2015
Beantwortet: Walter Roberson am 11 Dez. 2015
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 Kommentar
Jan
Jan am 10 Dez. 2015
Please post the code, which reproduces the problem. Otherwise it is impoosible to guess, what's going on on your computer.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 11 Dez. 2015
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

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by