1
$\begingroup$

I have a large set of data, which when interpolated as a full data set makes for a complicated line shape. The overall line is made of 3 or 4 overlapping different lines for example: There is an x^2 curve, an arctan(x), a ln(x), and x^-3 curve all hidden amongst the data.

How would I go about writing the code in Mathematica, to find an x^2 curve roughly around a certain point in the data, and fit it, and output details such as the line equation and R^2. Then subtract the x^2 from the fitting, so the other curves can be fitted in other places on the graph.

The end result being that adding all the superposed fitted lines together makes an overall fitted line, and with mathematica outputting the line equation and R^2 for each of those lines.

Thanks in advance!

$\endgroup$

1 Answer 1

1
$\begingroup$
FitModel[myData, {1, x, x^2, x^3, Cos[x], ArcTan[x]}, x]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.