changeset 9849:bd71d3f1e0ba octave-forge

ga: move test function to demo
author slackydeb
date Sat, 24 Mar 2012 16:34:40 +0000
parents 3c079f238951
children 2786ab9b8f5a
files main/ga/devel/demo_ga.m
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/main/ga/devel/demo_ga.m	Sat Mar 24 16:34:23 2012 +0000
+++ b/main/ga/devel/demo_ga.m	Sat Mar 24 16:34:40 2012 +0000
@@ -60,3 +60,8 @@
 ## The "UseParallel" option should speed up execution
                                 # TODO: write demo (after implementing
                                 # UseParallel) - low priority
+
+
+## This code shows a more complex objective function
+                                # TODO: convert to demo
+# %!test x = ga (struct ("fitnessfcn", @(x) rastriginsfcn (x(1:2)) + ((x(3) ** 2) - (cos (2 * pi * x(3))) + 1) + (x(4) ** 2), "nvars", 4, "options", gaoptimset ()));