Solving a Linear System of Equations in GH?

Dear experts,

Is there any GH component or plugin to solve a linear system of equations in matrix form?

A·X=B

Where A is a NxN square matrix and X and B are column vectors of N elements. Note that N would be quite large, e.g. in the range of hundreds or thousands.

Thanks a lot!

Can you give a bit more details? A small example (best), a picture, etc…

Hi Riccardo, thanks for the quick answer.

I´m sorry but I have no example, it is justa a generic algebra question.

The matrix A and vector B are generated using some external Python code that calls numpy library (that cannot be used from the GhPython component) to solve the linear system of equations. I want to know the vector X.

I have recently posted a question in “Grasshopper Developers” to find an alternative way to run numpy from GH using Python, but there is not an answer yet.

Hi again.

I’m not saying I know this specific “field” (math>matrix) , but i’m pretty sure your questions lacks the basilar “baits” to attract replies and solutions. :rofl:

See Help Us Help You .

If you have something on grasshopper, share that!
If you are loading your data from a .csv or a python script or else… internalize that and post it here!
Solve manually the first row, add some arrows and comments, explain what you have and what you want to obtain. Be specific!

It’s not a serious meter but I feel like in this forum (grasshopper category) you lose 80% of your chance to get replies if you do not post a picture. And similar is about posting a .gh file.

I think something near 1% of this category readers know what is a matrix and how to use it.
(I’m part of the 99%, never needed to know… but i’m here to learn!)


Personally, I guess some smart use of list / graft / tree managing can help you a lot, but I’m only guessing…

2 Likes

I think I solved the issue with running “numpy” from GhPython in the post above. Thanks!