I have a desired vector u=[0.5 1 2 40 70 90]. I give this vector to a metaheuristic algorithm and I run the algorithm. The algorithm runs 100 times and the algorithm does the following for me:
1-Estimates 100 such vectors for me and sotres then in variable Position, but the elements inside the estimated vectors are not in the same order as in the given vector u.
2- Estimates 100 values of fitness and stores them in variable Cost.
3- Estimates 100 velocities of the same size as u and sotres them in variable Velocity
And all above variables are stored in struct BestSol. I want to write a matlab program such that all these estimated vectors in point1 bove are sotred in the same order as u. All values in point2 above are in descending order and all values in point3 above are also in same order as u. Can any body helep me in this regard?