You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtxOptimization Class > TMtxOptimization Properties > TMtxOptimization.VariableParameters Property
Dew Math for .NET
ContentsIndexHome
Example
using Dew.Math; using Dew.Math.Units; using Dew.Math.Editors; double Banana(TVec Pars, TVec Consts, object[] objs) { return 100*Math387.IntPower(Pars[1]-Math387.IntPower(Pars[0],2),2) + Math387.IntPower(1-Pars[0],1); } void Example(TMtxOptim opt1) { // function with two variables // initial values for variables => Pars[0] := 2, Pars[1] := -1; opt1.VariableParameters.SetIt(false,new double[] {2,-1}); opt1.RealFunction = Banana; opt1.OptimizationMethod = optMarquardt; // numeric approximation opt1.GradProcedure = null; opt1.GradHessProcedure = null; opt1.Recalculate(); // now VariableParameters holds minimum position MtxVecEdit.ViewValues(opt1.VariableParameters,"Minimum position"); end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.