how to gave the input for the following functions?
1 次查看(过去 30 天)
显示 更早的评论
function [x, fval, exitflag, output] = pso(objfunc, nvars, options)
In that function specified the objfunc means "real-valued function of a single, real-valued vector argument"
please call the function with example would been easy to understand
0 个评论
回答(1 个)
Walter Roberson
2015-7-2
Example:
@(x) (x(1)-20).^2 + cos(x(2))
3 个评论
Walter Roberson
2015-7-2
You have not indicated what is to be optimized. What parameter is being looked for?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle Swarm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!