20 years old code

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 Commenti

KSSV
KSSV il 12 Ago 2018
Modificato: KSSV il 12 Ago 2018
What we can comment with out having a look on the code? :|
Walter Roberson
Walter Roberson il 12 Ago 2018
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 il 12 Ago 2018
It uses \ and also calls for optimization routines.
dpb
dpb il 12 Ago 2018
Modificato: dpb il 12 Ago 2018
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.

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 12 Ago 2018

0 voti

  • 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 Commento

dpb
dpb il 12 Ago 2018
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.

Accedi per commentare.

Categorie

Richiesto:

il 12 Ago 2018

Commentato:

dpb
il 12 Ago 2018

Community Treasure Hunt

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

Start Hunting!

Translated by