numpy / numpy-tutorials

NumPy tutorials & educational content in notebook format
https://numpy.org/numpy-tutorials/
Other
491 stars 187 forks source link

Static Equilibrium Tutorial Enhancement #198

Open AlexGriffiths526 opened 11 months ago

AlexGriffiths526 commented 11 months ago

Hi, I have been following the Static Equilibrium tutorial and found it very useful so thank you to @h2o-DS for putting this together. I was wondering if the last example could be extended to show how the matrices could be solved using Numpy.

h2o-DS commented 11 months ago

Hello, @AlexGriffiths526. I am glad to hear you found the tutorial helpful. This linear system of equations can be solved with numpy.linalg.solve(A, B) where matrix A contains the coefficients for each variable and B is the constants for each equation. For five equations and five variables A would be 5x5 and B would be 5x1. You are correct in that would be useful for the problem. I will look into updating the tutorial.

rossbar commented 11 months ago

I was wondering if the last example could be extended to show how the matrices could be solved using Numpy.

By all means, proposals to improve/extend the tutorials are welcome!