# Fitting data with a complex function, but requiring real parameters

I am trying to fit a complex data with a complex function, with the real fitting parameters. I was trying to put there constraints like this, but I got error:

FindFit[data,{1-a/(b-x^2-I*c*x),{Element[{a,b,c},Reals]}},{a,b,c},x]


If I remove constraints, I get in general complex parameters.

• Are you xs complex too? – Dr. belisarius Feb 26 '15 at 15:47
• No, they are real. – infinity Feb 26 '15 at 17:11
• Welcome to Mathematica.SE! I suggest the following: 0) Browse the common pitfalls question 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Dr. belisarius Feb 26 '15 at 17:28

k = 1 - a/(b - x^2 - I*c*x);