Skip to main content
12-Amethyst
February 20, 2023
Solved

Fit function to plotted graph (that resembles the shape of a haft circle)

  • February 20, 2023
  • 2 replies
  • 4798 views

Hi

I have plotted the results from two vectors. The graph resembles the shape of a half circle and I would like to find a function that fits the data so intersection points can be determined for other functions. 

I have tried many different curve-fitting tools but can't find a proper one that works. 

 

I'm  thankful for any help!

 

 

 

 

Best answer by Werner_E

I get slightly different values using CurveExpert Pro

Werner_E_0-1676906036862.png

And I get similar values in Prime using genfit() (though genfit is VERY sensible wrt the guess values).

Werner_E_1-1676906149759.png

BTW, as we can see far to the right of the Prime sheet how the data is actually calculated it should not surprise that a sinusoidal fit is suggested by CurveExpert 😉

 

2 replies

23-Emerald I
February 20, 2023

If I digitize the data, then rotate it so X is a function of Y, and send it to CurveExpert,, I get

Fred_Kohlhepp_0-1676896848850.png

Which has the form

Fred_Kohlhepp_1-1676896917526.png

Prime 4 attached

 

 

Werner_E25-Diamond IAnswer
25-Diamond I
February 20, 2023

I get slightly different values using CurveExpert Pro

Werner_E_0-1676906036862.png

And I get similar values in Prime using genfit() (though genfit is VERY sensible wrt the guess values).

Werner_E_1-1676906149759.png

BTW, as we can see far to the right of the Prime sheet how the data is actually calculated it should not surprise that a sinusoidal fit is suggested by CurveExpert 😉

 

12-Amethyst
February 21, 2023

Wow! Thanks for the good explanation! 

23-Emerald I
February 24, 2023

It is possible to define functions rather than vectors for your plots:

Fred_Kohlhepp_0-1677257723199.png

I've done it in the attached Prime 8 Express sheet.

Attempts to solve for the intersection (in Express) have failed; maybe someone with a solve block capability?

Note that it's possible to create functions only using the parameter "y", which would result in a single intersection point.  I introduced a second variable (l_k) hoping to be able to trace the intersection point as a function of that variable.

Fred_Kohlhepp_1-1677258248309.png 

If only one point is required . . .

 

Good Luck!

 

25-Diamond I
February 24, 2023

Here you are ...

As solve block does the job pretty well but is a bit  sensitive wrt the guess values

Werner_E_1-1677270927150.png