User defined optimization solver options
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Umberto
el 4 de Ag. de 2015
Respondida: Alan Weiss
el 5 de Ag. de 2015
I have defined my own optimization solver, and I was trying to set the options using optimset. I tried to change the Algorithm field, but it doesn't let me change it to other algorithms apart from the allowed ones.
So I used a structure instead defined by me. The problem is that with a structure I cannot use optimget(options, FieldName, default) to extract the value of the field of interest and put a default if the Field doesn't exist in the options structure. How can I do this? Especially the default part is really important to me. Also, how can I deal with case sensitivity? If someone writes 'algorithm' instead of 'Algorithm' how can I extract the value anyway?
Thanks a lot
0 comentarios
Respuesta aceptada
Alan Weiss
el 5 de Ag. de 2015
This isn't really an optimization question, but a programming question. I am not an expert programmer. But I'll tell you wat I think anyway.
As part of your solver, you can create a structure of default option values. Then read in values from a user-supplied option structure to override the default values.
For case sensitivity, you can use the lower function with all strings to make everything case-insensitive.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!