I have a complex function that I want to fit to some real data. The function is of the form:
Y = -2*imag((A-B)/(A+2*B)) ...................(1)
where
"imag" means imaginary part of the equationA = a - (b/X)*1i .....................(2)B = c - (d/X)*1i .....................(3)
Y has both imaginary and real parts. But it's the imaginary part that is relevant to my problem. How do I derive the values of a,b,c and d by fitting equation (1) to real experimental data? I have tried to use "lsqcurvefit" but it keeps returning the same starting values I put in! I am sure I must have missed something important.
Please kindly simplify your answers as much as possible as I'm still new at MATLAB.
Thanks.