source: ThirdParty/levmar/matlab/levmar.m@ 536b13

Action_Thermostats Add_AtomRandomPerturbation Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChangeBugEmailaddress ChemicalSpaceEvaluator Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_oldresults ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps
Last change on this file since 536b13 was 8ce1a9, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '5443b10a06f0c125d0ae0500abb09901fda9666b' as 'ThirdParty/levmar'

  • Property mode set to 100644
File size: 4.6 KB
Line 
1% LEVMAR matlab MEX interface to the levmar non-linear least squares minimization
2% library available from http://www.ics.forth.gr/~lourakis/levmar/
3%
4% Usage: levmar can be used in any of the 8 following ways:
5% [ret, popt, info, covar]=levmar(fname, jacname, p0, x, itmax, opts, 'unc', ...)
6% [ret, popt, info, covar]=levmar(fname, jacname, p0, x, itmax, opts, 'bc', lb, ub, ...)
7% [ret, popt, info, covar]=levmar(fname, jacname, p0, x, itmax, opts, 'lec', A, b, ...)
8% [ret, popt, info, covar]=levmar(fname, jacname, p0, x, itmax, opts, 'blec', lb, ub, A, b, wghts, ...)
9%
10% [ret, popt, info, covar]=levmar(fname, jacname, p0, x, itmax, opts, 'bleic', lb, ub, A, b, C, d, ...)
11% [ret, popt, info, covar]=levmar(fname, jacname, p0, x, itmax, opts, 'blic', lb, ub, C, d, ...)
12% [ret, popt, info, covar]=levmar(fname, jacname, p0, x, itmax, opts, 'leic', A, b, C, d, ...)
13% [ret, popt, info, covar]=levmar(fname, jacname, p0, x, itmax, opts, 'lic', C, d, ...)
14%
15%
16% The dots at the end denote any additional, problem specific data that are passed uninterpreted to
17% all invocations of fname and jacname, see below for details.
18%
19% In the following, the word "vector" is meant to imply either a row or a column vector.
20%
21% required input arguments:
22% - fname: String defining the name of a matlab function implementing the function to be minimized.
23% fname will be called as fname(p, ...), where p denotes the parameter vector and the dots any
24% additional data passed as extra arguments during the invocation of levmar (refer to Meyer's
25% problem in lmdemo.m for an example).
26%
27% - p0: vector of doubles holding the initial parameters estimates.
28%
29% - x: vector of doubles holding the measurements vector.
30%
31% - itmax: maximum number of iterations.
32%
33% - opts: vector of doubles specifying the minimization parameters, as follows:
34% opts(1) scale factor for the initial damping factor
35% opts(2) stopping threshold for ||J^T e||_inf
36% opts(3) stopping threshold for ||Dp||_2
37% opts(4) stopping threshold for ||e||_2
38% opts(5) step used in finite difference approximation to the Jacobian.
39% If an empty vector (i.e. []) is specified, defaults are used.
40%
41% optional input arguments:
42% - jacname: String defining the name of matlab function implementing the Jacobian of function fname.
43% jacname will be called as jacname(p, ...) where p is again the parameter vector and the dots
44% denote any additional data passed as extra arguments to the invocation of levmar. If omitted,
45% the Jacobian is approximated with finite differences through repeated invocations of fname.
46%
47% - type: String defining the minimization type. It should be one of the following:
48% 'unc' specifies unconstrained minimization.
49% 'bc' specifies minimization subject to box constraints.
50% 'lec' specifies minimization subject to linear equation constraints.
51% 'blec' specifies minimization subject to box and linear equation constraints.
52% 'bleic' specifies minimization subject to box, linear equation and inequality constraints.
53% 'blic' specifies minimization subject to box and linear inequality constraints.
54% 'leic' specifies minimization subject to linear equation and inequality constraints.
55% 'lic' specifies minimization subject to linear inequality constraints.
56% If omitted, a default of 'unc' is assumed. Depending on the minimization type, the MEX
57% interface will invoke one of dlevmar_XXX, dlevmar_bc_XXX, dlevmar_lec_XXX, dlevmar_blec_XXX or dlevmar_bleic_XXX
58%
59% - lb, ub: vectors of doubles specifying lower and upper bounds for p, respectively
60%
61% - A, b: k x m matrix and k vector specifying linear equation constraints for p, i.e. A*p=b
62% A should have full rank.
63%
64% - C, d: k x m matrix and k vector specifying linear inequality constraints for p, i.e. C*p>=d
65% A should have full rank.
66%
67% - wghts: vector of doubles specifying the weights for the penalty terms corresponding to
68% the box constraints, see lmblec_core.c for more details. If omitted and a 'blec' type
69% minimization is to be carried out, default weights are used.
70%
71%
72% output arguments
73% - ret: return value of levmar, corresponding to the number of iterations if successful, -1 otherwise.
74%
75% - popt: estimated minimizer, i.e. minimized parameters vector.
76%
77% - info: optional array of doubles, which upon return provides information regarding the minimization.
78% See lm_core.c for more details.
79%
80% - covar: optional covariance matrix corresponding to the estimated minimizer.
81%
82
83error('levmar.m is used only for providing documentation to levmar; make sure that levmar.c has been compiled using mex');
Note: See TracBrowser for help on using the repository browser.