Skip to main content
1-Visitor
December 12, 2014
Solved

this expression redefines a previously defined functions

  • December 12, 2014
  • 3 replies
  • 2539 views

I dont know what I do wrong:(Please look at this in xmcd

Best answer by Werner_E

Thats a tricky one. The problem is that the symbolics will trace back all definitions how a variable is derived and will evaluate this calclulations symbolically. In your case it will choke at the definition of Xp. Xp is derived by using lsolve and lsolve cannot be evaluated symbolically.

Workaround is to cut the connection between Xp and lsolve by using a redefinition with an inline assignment:

1.png

Not all works as expected and you see the symbolic function definition

2.png

P.S.: I see you found the correct value for x.N in your routine X_Gauss yourself. Better replace it by a more general expression using the argument U

3.png

3 replies

19-Tanzanite
December 12, 2014

Just use bp(x)=. Don't use the symbolic evaluation.

Alan

1-Visitor
December 12, 2014

Could You do it in xmcd, wrong and correct??I dont see problem:(

Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
December 12, 2014

Thats a tricky one. The problem is that the symbolics will trace back all definitions how a variable is derived and will evaluate this calclulations symbolically. In your case it will choke at the definition of Xp. Xp is derived by using lsolve and lsolve cannot be evaluated symbolically.

Workaround is to cut the connection between Xp and lsolve by using a redefinition with an inline assignment:

1.png

Not all works as expected and you see the symbolic function definition

2.png

P.S.: I see you found the correct value for x.N in your routine X_Gauss yourself. Better replace it by a more general expression using the argument U

3.png