Is it possible to solve a system of equations in grasshopper?

hello, all
Is it possible to solve solve a system of equations in grasshopper?
I tried to added the “MathNet.Numerics.dll” in c# but it seems diden’t work .
I dont know why.
Please help me,thank you .

How are your equations defined?

I’d like to know because it makes sense to add a standard component for that in Grasshopper 2 since MathNet is included.

2 Likes

My equations in matlab is like this.
image

We can solve the equations easily in matlab. But now we want to solve it in grasshopper. Because the result of this equation is some geometric parameter.
Thank you for your reply.
By the way, can grasshopper c# call Math.Net directly now?

There’s no script component for GH2 yet, and GH1 doesn’t reference Math.Net.
GH2 does and re-exposes a bunch of Math.Net methods via its own Mathematics class so you can use some of it without adding a specific reference. But it’s something we’ll make sure works easily once a script component becomes available.

I’m afraid I don’t quite follow. First off where do r_x, n and j come from?

Also these are just five expressions using a set of variables. I assumed you were looking for a way to solve N expressions with N unknowns. Or are the f1, f2, etc. values numeric constants?

Thank you for the response.This is the complete equation part of the code.f1 to f5 is the equation.This approach follows the syntax of matlab and may differ significantly from c#.So far I’ve tried to solve these equations in rhino8 using the sciy library in python, but it doesn’t always get the right solution.

Hi,
I’m quite familiar with Matlab, if you send the matlab script in text format, I will definitely give it a look and help you with a custom component for GH.
Farouk