I've got a code from 2001 which I need to use for my research. The code runs well but I get a different graph than the one they achieved back then. Does anyone know what changes have been made in the last 20 years that might cause this type of problem?

4 件のコメント

KSSV
KSSV 2018 年 8 月 12 日
編集済み: KSSV 2018 年 8 月 12 日
What we can comment with out having a look on the code? :|
Walter Roberson
Walter Roberson 2018 年 8 月 12 日
Does the code use random numbers? Does it use \ or inv() or svd() or other linear algebra routines? Does it call optimization routines? Does it do calculations on large arrays?
Rebeca Miyar
Rebeca Miyar 2018 年 8 月 12 日
It uses \ and also calls for optimization routines.
dpb
dpb 2018 年 8 月 12 日
編集済み: dpb 2018 年 8 月 12 日
Are you sure it isn't just data not the code per se that is the difference between figures--how do you know the exact code and data produced the exact figure you're comparing to?
It's really not unusual that a reported figure and the code as published don't actually match identically; things get edited and not everything always gets modified to match in a final report/document.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 8 月 12 日

0 投票

  • over the last 20 years, the default algorithms have changed for several of the routines in the Optimization Toolbox
  • The \ operator can detect more patterns of matrices than it could 20 years ago, handling the special patterns through different code routes. That can lead to increased accuracy and result in different round-off errors
  • The \ operator is affected by changes to the underlaying third-party linear algebra routines such as LAPACK, BLAS, and Intel's MKL (Math Kernel Library). Those changes generally serve to improve accuracy, but the changes also tend to handle near-singular matrices differently, potentially leading to very different results for them. Also, those libraries can take advantage of more and more vectorized hardware instructions, but vectorized hardware instructions can have slightly different round off.
  • The random number generators use different algorithms by default now than they did 20 years ago.

1 件のコメント

dpb
dpb 2018 年 8 月 12 日
Which raises Q? if it's important does OP know which release was used for the original? I'm not sure w/o going to look just how far back the available releases go, but quite some time; might be feasible to rerun with the original or at least one much closer that would remove at least some of whatever algorithmic changes there have been. Would be, perhaps, an interesting exercise if nothing else.
Of course, we don't know what "a different graph" means; maybe it's just remnants of the HG2 to HG1 switch and nothing at all to do with the calculations.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

2018 年 8 月 12 日

コメント済み:

dpb
2018 年 8 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by