always this message : The first-order optimality measure, 0.0, is less than options
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Jan
el 4 de Nov. de 2011
Walter asked you already to show the relevant parts of the code. Without seeing them, only wild guessing is possible.
Respuestas (3)
21did21
el 7 de Nov. de 2011
2 comentarios
Jan
el 7 de Nov. de 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
el 7 de Nov. de 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
el 7 de Nov. de 2011
1 comentario
Walter Roberson
el 7 de Nov. de 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
Ver también
Categorías
Más información sobre Financial Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!