You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings, beginner here, I need to learn how to parse and evaluate a complex-valued expression to its real and imaginary parts, but getting 2 errors, (Error CS1061 'SymbolicExpression' does not contain a definition for 'RealPart' and no accessible extension method 'RealPart' accepting a first argument of type 'SymbolicExpression' could be found (are you missing a using directive or an assembly reference?)). Couldn't find documentation for class references or unit tests to assist me. Can you point me to documentation with complex examples, or tell me how to fix these errors?
using MathNet.Numerics;
using MathNet.Numerics.LinearAlgebra;
using MathNet.Symbolics;
string complexString = "3 + 2i + 1/3i - 7";
SymbolicExpression expression = SymbolicExpression.Parse(complexString);
// Extract real and complex parts
SymbolicExpression realPart = expression.RealPart();
SymbolicExpression complexPart = expression.ComplexPart();
Console.WriteLine("Real Part: " + realPart);
Console.WriteLine("Complex Part: " + complexPart);
The text was updated successfully, but these errors were encountered:
Greetings, beginner here, I need to learn how to parse and evaluate a complex-valued expression to its real and imaginary parts, but getting 2 errors, (Error CS1061 'SymbolicExpression' does not contain a definition for 'RealPart' and no accessible extension method 'RealPart' accepting a first argument of type 'SymbolicExpression' could be found (are you missing a using directive or an assembly reference?)). Couldn't find documentation for class references or unit tests to assist me. Can you point me to documentation with complex examples, or tell me how to fix these errors?
The text was updated successfully, but these errors were encountered: