Effacer les filtres
Effacer les filtres

20 years old code

1 vue (au cours des 30 derniers jours)
Rebeca Miyar
Rebeca Miyar le 12 Août 2018
Commenté : dpb le 12 Août 2018
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 commentaires
Rebeca Miyar
Rebeca Miyar le 12 Août 2018
It uses \ and also calls for optimization routines.
dpb
dpb le 12 Août 2018
Modifié(e) : dpb le 12 Août 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.

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 12 Août 2018
  • 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 commentaire
dpb
dpb le 12 Août 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.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by