Particle Swarm - Additional Arguments
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Luce Ca
am 12 Mai 2016
Kommentiert: Luce Ca
am 13 Mai 2016
Hello,
I have to send some additional arguments to my objective function fun.
If I do this, I get an error saying that I have too many input arguments.
[xn3,fvaln3,exitflagn3,outputn3] = particleswarm(@fun,nvars,lb,ub,options, additionalArguments);
Then I tried the following thing but I got an error saying I can't have a structure as an input argument.
[xn3,fvaln3,exitflagn3,outputn3] = particleswarm({@fun,additionalArguments},nvars,lb,ub,options);
Thanks in advance!
0 Kommentare
Akzeptierte Antwort
Alan Weiss
am 12 Mai 2016
That older way of passing additional arguments is supported but not documented for older functions. Newer functions do not support it at all.
Alan Weiss
MATLAB mathematical toolbox documentation
3 Kommentare
Walter Roberson
am 13 Mai 2016
simulannealbnd does not have A, b, Aeq, beq or nonlcon arguments .
[Param,fval, exitflag,output] = simulannealbnd(f, Param0, LB, UB, options);
Weitere Antworten (1)
Stalin Samuel
am 12 Mai 2016
You cannot add additional arguments to matlab predefined functions. click hrer for more about particleswarm
1 Kommentar
Siehe auch
Kategorien
Mehr zu Optimization Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!