Is there any way to use the FindFit function with complex data/functions, but to only return real results for the parameters?(adsbygoogle = window.adsbygoogle || []).push({});

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.

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica - FindFit with complex numbers

Loading...

Similar Threads - Mathematica FindFit complex | Date |
---|---|

Mathematica Cannot do the integral of the Hyper-geometric function? | Mar 11, 2018 |

Mathematica Cannot Plot This Function in Mathematica | Feb 26, 2018 |

FindFit doesn't work for me in Mathematica | Jun 29, 2014 |

[Mathematica] FindFit/NonlinearModelFit with non-gaussian residuals | Mar 2, 2014 |

Mathematica to FindFit for multiple data set | Mar 5, 2013 |

**Physics Forums - The Fusion of Science and Community**