Using PSO in MATLAB, I follow the user manuals to set the options:
options = optimoptions('particleswarm','SwarmSize',50,'InitialSwarmMatrix',[1.5,4.2,3.11,6.71]);
Error using optimoptions (line 105)
'InitialSwarmMatrix' is not an option for PARTICLESWARM.
A list of options can be found on the PARTICLESWARM documentation page.
While it works for the other options mentioned in the manual:
options = optimoptions('particleswarm','InitialSwarmSpan',4) % fine
The parameter you are trying to use is not implemented in MATLAB 2015b or older versions, it was added in MATLAB 2016a.
Use the documentation which comes with your MATLAB installation, you can access it with the doc
command.