Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

declare symbolic #76

Open
Electrowolf2 opened this issue Oct 7, 2019 · 5 comments
Open

declare symbolic #76

Electrowolf2 opened this issue Oct 7, 2019 · 5 comments

Comments

@Electrowolf2
Copy link

Hello, my problem is the following: I am working with unity3d in C # language and when I want to declare a variable, I need to specify the type of variable first, it does not allow me to place the word "var", and try all the types of variable that the program but I always get that you can not convert any type to the expression type.

how should I do it? Thanks for the help

@FoggyFinder
Copy link
Contributor

Hello. There is a sample in docs:

using Expr = MathNet.Symbolics.SymbolicExpression;

var x = Expr.Variable("x");

https://symbolics.mathdotnet.com

@cdrnet
Copy link
Member

cdrnet commented Oct 8, 2019

So in this example, instead of var x = you could write Expr x = . When using the SymbolicExpression wrapper, then all expressions will always have that type.

@Electrowolf2
Copy link
Author

I have already seen the example as you mention foggy, but as I mentioned before, the word "var" does not recognize me, I get an error, cdrnet, try to do it in the way you tell me but also does not recognize me, I still have the problem .

I don't know if it's any use, I could upload photos so that you can see that the visual studio doesn't recognize those words.

@Electrowolf2
Copy link
Author

Hello guys, well I tell you that I have managed to fix the problem, but I have found another one and I guess it is easier to solve than the previous one but I still have not been able to solve it, maybe it is a problem of the VS version (2019).

The new problem is the following: I have already described the mathnet.symbolics nuguet from the VS download manager, I include it in the middle of the script, and there is no error, but when I want to run it in unity3d, it tells me the following:

Assets \ scripts \ testeo_mathnet.cs (4.7): error CS0246: The type or namespace name 'MathNet' could not be found (are you missing a using directive or an assembly reference?)

I thought it would be solved by copying the dlls to the folder where I have the script but it didn't work.

Could you help me? I appreciate the help in advance.

@FoggyFinder
Copy link
Contributor

The new problem is the following: I have already described the mathnet.symbolics nuguet from the VS download manager, I include it in the middle of the script, and there is no error, but when I want to run it in unity3d, it tells me the following:

@Electrowolf2 Are you sure that package was installed successfully?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants