- #1
NeoDevin
- 334
- 2
Is there any way to use the FindFit function with complex data/functions, but to only return real results for the parameters?
Right now I'm getting the following error:
FindFit::nrnum: The function value 62.6185+25.5493i is not a real number at {c1f,c2f} = {1.,1.}.
From the code:
FindFit[data, {model, {Im[c1f] == 0, Im[c2f] == 0}}, {c1f, c2f}, x]
Alternatively, is there any way to fit the same parameters in 2 functions to 2 different data sets simultaneously? (then I could just separate the real and imaginary parts, and fit them both)
Thanks in advance.
Right now I'm getting the following error:
FindFit::nrnum: The function value 62.6185+25.5493i is not a real number at {c1f,c2f} = {1.,1.}.
From the code:
FindFit[data, {model, {Im[c1f] == 0, Im[c2f] == 0}}, {c1f, c2f}, x]
Alternatively, is there any way to fit the same parameters in 2 functions to 2 different data sets simultaneously? (then I could just separate the real and imaginary parts, and fit them both)
Thanks in advance.