moraissilva
Messages postés14Date d'inscriptionmardi 28 mars 2006StatutMembreDernière intervention20 février 2014
-
17 janv. 2008 à 17:56
moraissilva
Messages postés14Date d'inscriptionmardi 28 mars 2006StatutMembreDernière intervention20 février 2014
-
17 janv. 2008 à 19:08
Hello
I need code VB6 to do work in algebraic expressions until 3 variables.
The user writes in the text box the following function f(x1,x2):
5x1^3 + (x1^2+x2^2)^2 + 3*x1*x2^2 - 2*x1*x2 and a guess: x1=1 and x2=2 (example).
I need to show the expressions of the partial derivatives and to compute their value in this guess.
I need code to get the expression simplified as a monovariable function of "t" after the substituion (example) x1=1+4t and x2=2-3t.
After that I can go on with the computations (method Frank-Wolfe) to optimize nonlinear functions in convex spaces.
Of course I'm ready to pay the code.
Best regards
Morais Silva
www.moraissilva.com
antoniocmsilva@netcabo.pt
moraissilva
Messages postés14Date d'inscriptionmardi 28 mars 2006StatutMembreDernière intervention20 février 2014 17 janv. 2008 à 18:03
I fogot to say that I only need code to manipulate the expressions.
I already developed the code to the method Frank-Wolfe but it is necessary the user to write the function, the partial derivatives and the function linearized...
Morais Silva
cs_loulou69
Messages postés672Date d'inscriptionmercredi 22 janvier 2003StatutMembreDernière intervention 2 juin 20161 17 janv. 2008 à 18:29
Hello, you can do that to get the result:
Formula= "5x1^3 + (x1^2+x2^2)^2 + 3*x1*x2^2 - 2*x1*x2"
Formula= Replace(Formula,x1,"1")
Formula= Replace(Formula,x2,"2")
Result= Eval(Formula)