How to pass extra parameters to custom Output Function?
Show older comments
Hi,
I want to pass
test_var = 5;
to the custom output function
[state, options,optchanged] = testFCN(options,state,flag)
in the optimoptions of gamultiobj().
I tried:
[state, options,optchanged] = testFCN(options,state,flag,settings)
and
test_handle1 = @(options,state,flag) testFCN(options,state,flag,test_var);
test_handle2 = @(x) testFCN(x,test_var);
but I always get the error
Too many input arguments.
What am I doing wrong?
Accepted Answer
More Answers (0)
Categories
Find more on Surrogate Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!