User defined optimization solver options
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Alan Weiss
2015 年 8 月 5 日
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 件のコメント
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!