In the situation where the calculation is all by formula and no "if" or logical indexing, then if you have the symbolic toolbox, you can call the objective function with different orders of symbols and see if you get the same output. The outputs might not be in identical order, so subtract the two prospective outputs and see if the result is 0.
If f(x,y,z) has output equivalent to f(x,z,y) for symbolic x, y, z then the function is symmetric around y vs z.