* Bugs 5824, 7732, 15344 fixed: datafit() upgraded + page overhauled
[scilab.git] / scilab / modules / optimization / demos / optimization.dem.gateway.sce
index f96ee13..8271c62 100644 (file)
@@ -1,22 +1,32 @@
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2008 - INRIA
+// Copyright (C) 2010-2011 - DIGITEO - Allan CORNET
 //
-// This file is released into the public domain
+// This file is released under the 3-clause BSD license. See COPYING-BSD.
 
-demopath = get_absolute_file_path("optimization.dem.gateway.sce");
-subdemolist = ["Non linear data fitting", "datafit/datafit.dem.gateway.sce"; ...
-              "Optimisation",            "optim/optim.dem.gateway.sce"; ...
-              "fminsearch",              "neldermead/neldermead.dem.gateway.sce"];
+function subdemolist = demo_gateway()
 
-if with_module('genetic_algorithms') then
-  subdemolist = [subdemolist; ...
-                 "Genetic algorithms", "../../genetic_algorithms/demos/genetic_algorithms.dem.gateway.sce"];
-end 
+    demopath = get_absolute_file_path("optimization.dem.gateway.sce");
+    _("Optimization and Simulation");  // lets gettext() harvesting it
+    add_demo("Optimization and Simulation", demopath+"optimization.dem.gateway.sce");
 
-if with_module('simulated_annealing') then
-  subdemolist = [subdemolist; ...
-                 "Simulated Annealing", "../../simulated_annealing/demos/simulated_annealing.dem.gateway.sce"];
-end
+    subdemolist = [
+    _("datafit: Nonlinear fitting"), "datafit/datafit.dem.gateway.sce"
+    _("Optimisation"),  "optim/optim.dem.gateway.sce"
+    _("fminsearch"),    "neldermead/neldermead.dem.gateway.sce"
+    _("ICSE"),          "icse/icse.dem.gateway.sce"
+    ];
 
-subdemolist(:,2) = demopath + subdemolist(:,2)
-clear demopath;
\ No newline at end of file
+    subdemolist = [subdemolist; ..
+    _("Genetic algorithms"), "genetic/genetic_algorithms.dem.gateway.sce"];
+
+    if with_module("simulated_annealing") then
+        subdemolist = [subdemolist; ..
+        _("Simulated Annealing"), "../../simulated_annealing/demos/simulated_annealing.dem.gateway.sce"];
+    end
+
+    subdemolist(:,2) = demopath + subdemolist(:,2);
+endfunction
+
+subdemolist = demo_gateway();
+clear demo_gateway;