demos index build only when we need + .start embedded in a function (cleared after)
[scilab.git] / scilab / modules / optimization / demos / optimization.dem.gateway.sce
1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2008 - INRIA
3 // Copyright (C) 2010-2011 - DIGITEO - Allan CORNET
4 //
5 // This file is released under the 3-clause BSD license. See COPYING-BSD.
6
7 function subdemolist = demo_gateway()
8
9   demopath = get_absolute_file_path("optimization.dem.gateway.sce");
10   add_demo(gettext("Optimization and Simulation"), demopath+"optimization.dem.gateway.sce");
11
12   subdemolist = [_("Non linear data fitting"), "datafit/datafit.dem.gateway.sce"; ..
13                  _("Optimisation"),            "optim/optim.dem.gateway.sce"; ..
14                  _("fminsearch"),              "neldermead/neldermead.dem.gateway.sce"];
15
16   if with_module('genetic_algorithms') then
17     subdemolist = [subdemolist; ..
18                  _("Genetic algorithms"), "../../genetic_algorithms/demos/genetic_algorithms.dem.gateway.sce"];
19   end
20
21   if with_module('simulated_annealing') then
22     subdemolist = [subdemolist; ..
23                  _("Simulated Annealing"), "../../simulated_annealing/demos/simulated_annealing.dem.gateway.sce"];
24   end
25
26   subdemolist(:,2) = demopath + subdemolist(:,2);
27 endfunction
28
29 subdemolist = demo_gateway();
30 clear demo_gateway;