Simulates the movements of a swarm to minimize the objective function
This example was authored by the MathWorks community.
Optimize using the particleswarm solver. The particle swarm algorithm moves a population of particles called a swarm toward a minimum of an objective function. The velocity of each
Use an output function for particleswarm. The output function plots the range that the particles occupy in each dimension.