I have to find a model that fits a experimental data. The issue is that the model is a complex function.
I have to minimize the error between the model and the experimental data, both for the real part and the imaginary part. I'm using fminsearch to find the parameters of the function which minimize the error. I have separated the real and imaginary part in order to use that function.
My problem is that I don´t know the function of error I have to use.
Up to now i have use
norm ((error_in_real_part)^2+(error_in_imaginary_part)^2)
but the obtained model does not satisfy the experimental data at all, at least for the imaginary part. I've changed the initial conditions several times and its impossible to improve the fit of the imaginary part. The magnitude of the imaginary part is several times less than the real one. That could be the reason?