Does symbolics give wrong results?

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 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

質問済み:

2015 年 12 月 10 日

回答済み:

2015 年 12 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by