Note: with fminsearch the values are not constrained to your target of -1 to +1 so you might need to run the search several times
If you had a strict hierarchy x(1)<=x(2)<=x(3) and so on then this is not suitable and you should instead use fmincons with linear inequalities and upper and lower bound.
Best Answer