Hi,
I understand you are getting incorrect results while calculating coefficients for the force on the bridge pile body using the least squares method.
Upon reviewing the provided code, I have identified that the issue lies in the initial values assigned to the least square coefficients. The least square coefficients are too small and even after calculating they remain relatively small.
To resolve this issue, I suggest you assign a greater initial value to the least square coefficients. You may directly assign greater values to A, B, and C variable.
Furthermore, please verify that you are following the correct method to update these coefficients.
I hope this helps!