Hello Luca,

I am a bit confused by the output of VB script.

Equation is: y = f(x), where
x is in the order of 0-2K
y is in the order of 5-10K

The output of fitted polynomial is in y-space, thus I would expect fitted 
values to be similar to those of Y.

Now, sc values are very small and alternating sign.

I would suspect that vb script is doing something else than 3-rd degree 
polynomial fitting.

I would suggest producing scatter plots with fitted lines so you can inspect 
situation visually.

This is all I can say without inspecting VB code.

Correct me, if I am missing something obvious - this does happen.

Regards,
dgpb

> On 25 Mar 2024, at 18:04, Luca Bertolotti <luca72.bertolo...@gmail.com> wrote:
> 
> Hello
> in a vb program they use 3rd degree approx and get this value including 
> displacement:(SC)
> <image.png>
> 
> Ii think that i'm doing the same with numpy but I get different value does 
> anyone can help me please
> 
> radious = [1821, 1284, 957, 603,450, 245]
> y = [6722, 6940, 7227, 7864,8472, 10458]
> p = np.polyfit(radious, y, 3,)
> t = np.polyval(p, radious)
> [ 6703.33694696  7061.23784145  7051.49974149  7838.84623289
>   8654.47847319 10373.60076402]
> You can see polyval is difference from the sc. of the table
> Any help is really appreciated
> 
> _______________________________________________
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: dom.grigo...@gmail.com

_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to