I have created a 4th order Runge Kutta Solver which will solve a pre-defined differential equation. I am trying to make the program more universal by allowing it to accept any user defined function. I have done this before for a polynomial but I am having problems extending that same application to a multi-variable equation.
I am using the substitute function but I am not sure how to use it for more than one variable.
t1y = WorksheetFunction.MultiSubstitute(f1, "x", x, f1, "y", y, f1, "z", z)
k1y = Evaluate(t1y)
where f1 is the user-defined funciton and x,y, and z are variables included in the function. The Excel error message states "Run-Time error 438: Object doesn't support this property or method"
The following code worked for my polynomial function:
fxl = WorksheetFunction.Substitute(funct, "x", xl)
where funct is the user-defined polynomial and xl is the varible.
I am using the substitute function but I am not sure how to use it for more than one variable.
t1y = WorksheetFunction.MultiSubstitute(f1, "x", x, f1, "y", y, f1, "z", z)
k1y = Evaluate(t1y)
where f1 is the user-defined funciton and x,y, and z are variables included in the function. The Excel error message states "Run-Time error 438: Object doesn't support this property or method"
The following code worked for my polynomial function:
fxl = WorksheetFunction.Substitute(funct, "x", xl)
where funct is the user-defined polynomial and xl is the varible.