optimizer to use in MEX
Ältere Kommentare anzeigen
I wanted to use an optimizer in a code that I want to MEX it. As far as I know the only suitable optimizer is fmincon but I have faced some problems wiht it. Is there any other optimizers that can be used in a MEX code?
2 Kommentare
Jan
am 7 Nov. 2021
What do you need? A local or global optimization? What kind of restraints does your problem have? There are dozens of different optimizations tools for the different types of prblems. What das "used in a MEX code mean"? Are you writing a C-Mex function? Do you want to call a Matlab function or coud it be a C or C++ tool also?
Alireza Azampour
am 9 Nov. 2021
Bearbeitet: Alireza Azampour
am 9 Nov. 2021
Antworten (1)
You're not going to get any advantage from including the optimization in the MEX unless possibly the optimizer is also implemented in C-code. If you have Matlab Coder, which supports both fmincon and fminsearch, you can convert the total code to C\C++ including the optimizer,
Be mindful, though, that fminsearch works well only for problems with a handful of unknowns (<=6 approximately).
Kategorien
Mehr zu Problem-Based Optimization Setup finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!