GA/simulink optimisation error

Hello,
Whe using pattern search for sdo optimise and changing the options for GA using gaoptimset, I get the following error:
Error using sdo.optimize (line 130)
SWITCH expression must be a scalar or string constant.
My code is:
opt = sdo.OptimizeOptions;
opt.Method = 'patternsearch';
opt.UseParallel ='always';
opt.MethodOptions=gaoptimset('Generations',20,'UseParallel',1,'PlotFcn',@gaplotbestf);
I am using MATLAB 2015b. Can anyone direct me where I have gone wrong?
THank you.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Design Optimization에 대해 자세히 알아보기

질문:

2019년 10월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by