permutation of pairs in GA
<p>I want to do a change in GA, this is my code:</p>

<pre><code>nvar=16;
options=gaoptimset('PlotFcns'{@gaplotbestf},'PopulationType','custom',
'TolFun',1e4,'CreationFcn',@mycreate,'CrossoverFcn',@mycross,
'MutationFcn',@mymutate,'PopulationSize',10*nvar);
p=[ 1 3.2 5 2  3 2.7 1.5 2  3 2 6 3.3  1.5 2.3 4 2.5 2 3 3.2 1.2 3 5 6.5 4 9 8 2.1 3 5 7.6 4 3 ];
a=AB;
b=B;
FitnessFCN=@(x) myfitness(x,p,a,b);
[x,fval,reason,output]=ga(FitnessFCN,nvar,[],[],[],[],[],[],[],options);
</code></pre>

<p>The vector with 32 elemnts is a actually a vector with 16 pairs, I mean:</p>

<pre><code>p=[ (1 3.2) (5 2)  (3 2.7) (1.5 2)  (3 2) (6 3.3)  (1.5 2.3) (4 2.5) (2 3) (3.2 1.2) (3 5) (6.5 4) (9 8) (2.1 3) (5 7.6) (4 3) ];
</code></pre>

<p>I want GA do the permutation of pairs not all the elemnts, I mean the second vector not the first vector, but the GA do the GA on 32 elements.I mean the x that GA returns me must be a vector with 16 pairs. Thanks.</p>