From: <i7...@us...> - 2010-03-14 13:32:31
|
Revision: 7061 http://octave.svn.sourceforge.net/octave/?rev=7061&view=rev Author: i7tiol Date: 2010-03-14 13:31:54 +0000 (Sun, 14 Mar 2010) Log Message: ----------- Changed version number and index file, include a constraints example into leasqr.m Modified Paths: -------------- trunk/octave-forge/main/optim/DESCRIPTION trunk/octave-forge/main/optim/INDEX trunk/octave-forge/main/optim/inst/leasqr.m Modified: trunk/octave-forge/main/optim/DESCRIPTION =================================================================== --- trunk/octave-forge/main/optim/DESCRIPTION 2010-03-13 07:52:23 UTC (rev 7060) +++ trunk/octave-forge/main/optim/DESCRIPTION 2010-03-14 13:31:54 UTC (rev 7061) @@ -1,10 +1,10 @@ Name: Optim -Version: 1.0.11 +Version: 1.0.13 Date: 2009-09-21 Author: Various Authors Maintainer: The Octave Community Title: Optimzation. -Description: Unconstrained Non-linear Optimization toolkit. +Description: Non-linear optimization toolkit. Depends: octave (>= 2.9.7), miscellaneous (>= 1.0.0) Autoload: yes License: GPL version 2 or later and GFDL Modified: trunk/octave-forge/main/optim/INDEX =================================================================== --- trunk/octave-forge/main/optim/INDEX 2010-03-13 07:52:23 UTC (rev 7060) +++ trunk/octave-forge/main/optim/INDEX 2010-03-14 13:31:54 UTC (rev 7061) @@ -12,9 +12,9 @@ cg_min de_min Data fitting - expfit expdemo - wpolyfit wpolyfitdemo - leasqr leasqrdemo + expfit + wpolyfit + leasqr LinearRegression Compatibility fminunc_compat @@ -33,4 +33,3 @@ bfgsmin_example rosenbrock samin_example - cg_min_example_1 cg_min_example_2 cg_min_example_3 Modified: trunk/octave-forge/main/optim/inst/leasqr.m =================================================================== --- trunk/octave-forge/main/optim/inst/leasqr.m 2010-03-13 07:52:23 UTC (rev 7060) +++ trunk/octave-forge/main/optim/inst/leasqr.m 2010-03-14 13:31:54 UTC (rev 7061) @@ -596,3 +596,28 @@ %! [f1, p1, kvg1, iter1, corp1, covp1, covr1, stdresid1, Z1, r21] = ... %! leasqr (t, data, pin, F, stol, niter, wt1, dp, dFdp, options); +%!demo +%! %% Example for linear inequality constraints. +%! %% model function: +%! F = @ (x, p) p(1) * exp (p(2) * x); +%! %% independents and dependents: +%! x = 1:5; +%! y = [1, 2, 4, 7, 14]; +%! %% initial values: +%! init = [.25; .25]; +%! %% other configuration (default values): +%! tolerance = .0001; +%! max_iterations = 20; +%! weights = ones (5, 1); +%! dp = [.001; .001]; % bidirectional numeric gradient stepsize +%! dFdp = 'dfdp'; % function for gradient (numerical) +%! +%! %% linear constraints, A.' * parametervector + B >= 0 +%! A = [1; -1]; B = 0; % p(1) >= p(2); +%! options.inequc = {A, B}; +%! +%! %% start leasqr, be sure that 'verbose' is not set +%! global verbose; verbose = false; +%! [f, p, cvg, iter] = ... +%! leasqr (x, y, init, F, tolerance, max_iterations, ... +%! weights, dp, dFdp, options) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |