Closed troelschristensen closed 3 years ago
Imports expr = MathNet.Symbolics.SymbolicExpression
Module Program
Sub Main(args As String())
Dim e1 = expr.Parse("a+a+a+2*(a+b)")
Console.WriteLine(e1.RationalSimplify("a"))
End Sub
End Module
prints 5*a + 2*b
That did the trick. Now it is working. GREAT!! Thank you, @FoggyFinder.
Hi.
Hope you can help me, with this little problem. I'm coding in visual basic and trying to find out, how to simplify a string of variables. But i'm stuck. Cant figure it out. It's most likely very easy to do, but I can't. :-(
Eg.
str = "a+a+a+2*(a+b)"
Can someone tell me, how I get a new string from the str that looks like "5a + 2b"?
Imports MathNet.Symbolics
Kind regards!