Matlab2017a: Standalone application, Undefined function of variable gaoptimset

I am working on Matlab 2017a. I have created a proyect that includes both the 'gaoptimset' and 'ga' functions of the Global Optimization Toolbox. When I run the Project in Matlab, it Works fine. However, when I run the standalone application I get the following error: "Undefined function of variable 'gaoptimset'" Why is this? Are these functions not compilable?

Answers (1)

If you are using MATLAB Compiler then all command line functionality of the Global Optimization toolbox can be compiled.
The usual issues apply: if MATLAB is not smart enough to figure out that a routine needs to be called, then it will not include the routine. You might need to use %#function gaoptimset or else you might need to tell MATLAB Compiler to include gaoptimset specifically.
I notice that gaoptimset is getting replaced; see https://www.mathworks.com/help/gads/options-changes-in-r2016a.html. However this should not affect your compiling.
Is it possible that you did the compiling using a MATLAB license that includes MATLAB Compiler but does not include Global Optimization Toolbox?

Categories

Asked:

on 5 Dec 2017

Answered:

on 5 Dec 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!