changeset 9673:ae49c70a62f8 octave-forge

add example of parameter restriction to samin_example.m
author mcreel
date Tue, 13 Mar 2012 13:53:22 +0000
parents dab86f0cf54a
children 5758bf7f1b2b
files main/optim/inst/samin_example.m
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/main/optim/inst/samin_example.m	Tue Mar 13 10:29:54 2012 +0000
+++ b/main/optim/inst/samin_example.m	Tue Mar 13 13:53:22 2012 +0000
@@ -50,6 +50,11 @@
 # SA controls
 ub = 10*ones(rows(theta),1);
 lb = -ub;
+# setting ub and lb to same value restricts that parameter, and the algorithm does not search
+ub(1,:) = 0;
+lb(1,:) = 0;
+theta(1,:) = 0; # must satisfy restriction
+
 nt = 20;
 ns = 5;
 rt = 0.5; # careful - this is too low for many problems