sl_particleSwarm

Optimization

Particle swarm optimizer. Uses a swarm of candidate solutions to find the global minimum.

Syntax

sl_particleSwarm(f, nvars)
sl_particleSwarm(f, nvars, lb, ub)

Examples

sl_particleSwarm('(x(1)-1)^2 + (x(2)-2)^2', 2)
▶ Run

Limitations

Requires server acceleration.

See Also

This function requires server acceleration. Available on paid tiers.

Try SimLab — Free MATLAB® Alternative

466 functions. Runs in your browser. No install.

Open SimLab

Stay Updated

Get notified about new simulations and tools. We send 1-2 emails per month.