Get parameters from Fit[] command

Grobe shared this idea 11 years ago
Completed

Hi.


In the attached file, then I have made a simple Get[] that draws a curve.


You can see the parameters of the function g(x) being 1.94, 0.02 and -6.98.


It would be nice to be able to extract this numbers like I have tried by using the variable WantToGetThisNumber. but it just returns the values from the slider, like expected.


I want WantToGetThisNumber to be 1.94, and change whenever g(x) changes.0


Thanks

https://ggbm.at/553129

Comments (5)

photo
1

hello

try WantToGetThisNumber=g(x(Root[g'(x)]))


saludos

photo
1

hello

try WantToGetThisNumber=g(x(Root[g'(x)]))


saludos

Hi.


Thanks for a good idea.


However, your method will work only for this type of functions. I'm able to get the number 1.94 with your method. However, I wish there was a more general way to get those numbers.


Here is my idea on how it could work:

Given the same file as atached in my previous post.

There could be a function that returned a list of all the non-fixed numbers that makes the function g(x) fit. Example:

    Listofnumbers = GetVariousNumbers[g]

and should return this:

    {1.94,0.02,-6.98}

photo
1

Hi. Is there any progress regarding this issue? Greetings.

photo
2

Yes, Coefficients() now works to get the fit parameters (for non-polynomials...) https://wiki.geogebra.org/e...

photo
1

Thank you.

photo
© 2023 International GeoGebra Institute