Minimize and complex numbers

Hi,
I keep running into a problem using minimize on a set of equations that are complex but after multiplying by the complex conjugate the imaginary part is zero but Minimize keeps outputting:

The objective function {((-0.802836+0. I)+scatter)^2,((-0.800188+0. I)+scatter)^2,((-0.835493+0. I)+scatter)^2,((-0.823595+0. I)+scatter)^2,((-0.807161+0. I)+scatter)^2,<<42>>,((-0.818022+0. I)+scatter)^2,((-0.811734+0. I)+scatter)^2,((-0.812057+0. I)+scatter)^2,<<115>>} should be scalar-valued. >>

So far I have tried to use the Re[] function to strip off the imaginary part but with the same results. Any ideas?

Perhaps the round-off errors introduce small imaginary parts in the function to minimize. Have you tried with Abs instead of multiplying by the conjugate?

Try Chop. It replaces approximate real numbers close to zero with integer 0.

Thanks for the replies, the problem was on my end with the independent variable definition.

Direct manipulation

In[7]:= ((-0.800188 + 0. I) + scatter)^2 /. Complex[x_, __] -> x

Out[7]= (-0.800188 + scatter)^2