I want to fit the data of a star's temperature with a function from a model. That function depend on several parameters. I want to know how can I find the value of those parameters.

The data is:

CasA = {{333, 6.3258}, {335, 6.3237}, {337, 6.317}, {340, 6.3127}, {342, 6.3104}}

The function that I'm using is:

Temperature[t_] := Tc/(1 + (t - tc) f/tc)

In the literature there are values for the parameters Tc and tc, however I want to find them using a fitting.

I have been trying changing the parameters by hand, but that looks like a very silly way to do it.

Thanks for your help.

Best, JD


1 Answer 1


You can use the FindFit function like this

FindFit[casA, temperature[t], {Tc, tc, f}, t]

It gives the result

{Tc -> 6.84314, tc -> 69.678, f -> 0.0216365}

By the way, it is good practice to name your variables with initial lower case.


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.