FindMinSet:

Path: FormationFlying/Guidance

% Find the order of columns in a square matrix which minimizes
   the diagonal sum.
   This function is valid only up to size 8x8 matrices.

   Since version 7.
------------------------------------------------------------------------
   Form:
   [order,minSum] = FindMinSet( mat )
------------------------------------------------------------------------

   ------
   Inputs
   ------
   mat           (n,n)     Square matrix        

   -------
   Outputs
   -------
   order         (1,n)     Order of columns (assuming rows go 1 - n)
   minSum         (1)      Minimum total cost

------------------------------------------------------------------------

Back to the FormationFlying Module page