always this message : The first-order optimality measure, 0.0, is less than options
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hello all,
Recently I came to the forum to ask for help about the functions of the tool box "optimization". I used "lsqnonlin" "lsqcurvefit" "finminuc" and every time I the same result:
my optimization stops after one iteration and the result: The first-order optimality measure, 0.000000e +000, IS = Less than options.TolFun 1.000000e-006.
after reading the documentation, it understand that is possible that i have a local minimum, yet when I change a little the starting values i have always the same problem: it seems odd to me that every time I put a game parameters of the algorithm says I have a local minimum?!?
can you tell me your opinion on that and how can I solve this. thank you very much
1 commentaire
Jan
le 4 Nov 2011
Walter asked you already to show the relevant parts of the code. Without seeing them, only wild guessing is possible.
Réponses (3)
21did21
le 7 Nov 2011
2 commentaires
Jan
le 7 Nov 2011
Please post the code by editing the original image and use code formatting as explained in the "Markup help" link. In the current form, the code is not readable.
Walter Roberson
le 7 Nov 2011
We would need to see WriteCalculTreatment to determine more.
What also need to see the functions Rm_exp and Fv_exp. We deduce they are functions because if they were variables they would have to be initialized within the scope of calculs.
Why do you bother to set RmMine or FvMine ? They are not global or persistent variables, so their value is going to be thrown away (unless they happen to be shared within a scope that you do not show us.)
21did21
le 7 Nov 2011
1 commentaire
Walter Roberson
le 7 Nov 2011
No variable is global unless it has been declared as global in the scope of the routine that is using it. The most obvious way to do that is with a "global" statement right inside calculs; the other methods require that the various routines be "nested" within the routine that declares the variable as global.
Your WriteCalculTreatment function needs all 6 of the variables declared in its header, as it attempts to pass all 6 of them to WriteT6DataFile() . Your calcul() routine is, however, only passing three parameters to WriteCalculTreatment
Voir également
Catégories
En savoir plus sur Financial Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!