MATLAB: Minimisation of simultaneous complex constrained equations

complexconstrainedcurve fittingMATLABoptimisation

Hi, I'm trying to find a solver that will work for my needs. I need to fit these two functions simultaneously for a range of x's via constrained fitting parameters a and b.
S1(x)=f(x,a,b)
S2(x)=g(x,a,b)
where S1, S2, f() and g() are all complex functions of x, whereas a and b are the fitting parameters which are strictly real and constrained within positive limits. S1 and S2 are vectors containing complex experimental data, f() and g() are mathematical expressions that are unfortunately too complicated to post.
Does anyone have any ideas which solver might work for me?
Thanks

Best Answer

Split everything into real and imaginary part and use lsqcurvefit or lsqnonlin to solve for a and b.
Best wishes
Torsten.