genetic algorithm 'too many input arguments'
1 次查看(过去 30 天)
显示 更早的评论
I want to minimize a function with a constraint which has 8 inputs. The problem is I cannot call the by x(1), x(2),etc because they are generated in another program in each loop and thos variables are used in other places. Does anyone have suggestion?
2 个评论
Walter Roberson
2013-12-1
Please show your code attempt, and show how the functions are being generated.
回答(1 个)
Walter Roberson
2013-12-2
Something like,
constraint_function = @(x) LPS(x(1), x(2), x(3), tilt, TArray, KtArray, LArray, WindArray);
??
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!