MATLAB: Sir how to write objective function for this in particle swarm optimization algorthim

Global Optimization Toolboxobjectivefunctionpsopv array

How to write the code for this objective function

Best Answer

I suppose that you know how to write code to calculate and . I suppose that you know how to write code to calculate the sum multiplied by . To maximize, you minimize the negative of that sum, as explained in Maximizing an Objective.
If you need more help, feel free to ask.
Alan Weiss
MATLAB mathematical toolbox documentation