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 <[email protected]> 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 -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ > Member address: [email protected] _______________________________________________ NumPy-Discussion mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: [email protected]
