tk_choose => x_choose
Pierre Marechal [Mon, 18 Feb 2008 13:59:18 +0000 (13:59 +0000)]
28 files changed:
scilab/modules/cacsd/demos/cont.dem
scilab/modules/cacsd/demos/control.dem
scilab/modules/cacsd/demos/flat/flat.dem
scilab/modules/cacsd/demos/pid.dem
scilab/modules/demo_tools/macros/demo_choose.sci
scilab/modules/demo_tools/macros/demo_file_choice.sci
scilab/modules/demo_tools/macros/demo_folder_choice.sci
scilab/modules/demo_tools/macros/demo_function_choice.sci
scilab/modules/gui/demos/dialog.dem
scilab/modules/metanet/demos/metro.sci
scilab/modules/optimization/demos/lmitool/lmi.dem
scilab/modules/optimization/demos/optimization.dem
scilab/modules/others/demos/simulation/bike/bike.dem
scilab/modules/others/demos/simulation/dae/dae.dem
scilab/modules/others/demos/simulation/dae/dae1.dem
scilab/modules/others/demos/simulation/dae/dae2.dem
scilab/modules/others/demos/simulation/ode/ode.dem
scilab/modules/others/demos/simulation/ode/odenew.dem
scilab/modules/others/demos/simulation/ode/odenew1.dem
scilab/modules/others/demos/simulation/ode/odenew2.dem
scilab/modules/others/demos/simulation/ode/odeold.dem
scilab/modules/others/demos/simulation/simulation.dem
scilab/modules/others/demos/simulation/wheel2/wheel.dem
scilab/modules/pvm/demos/pvm.dem
scilab/modules/randlib/demos/random.dem
scilab/modules/scilab2fortran/demos/demotrad.dem
scilab/modules/signal_processing/demos/signal.dem
scilab/modules/tclsci/demos/tk/tk.dem

index 32cfe20..9cb3910 100644 (file)
@@ -7,7 +7,7 @@
 
 deff('[]=demoexc(fil)','exec(''SCI/modules/cacsd/demos/''+fil)')
 while %t do
-  n=tk_choose(['LQG','Mixed-sensitivity','PID'],'Select a demo');
+  n=x_choose(['LQG','Mixed-sensitivity','PID'],'Select a demo');
   select n
   case 0
     break
index 19e762d..b9e1e37 100644 (file)
@@ -20,7 +20,7 @@ demolist=['LQG',               'lqg/lqg.dem'
 deff('[]=demoex(num)','exec(path+demolist(num,2),-1)')
 
 while %t then
-  num=tk_choose(demolist(:,1),'Choose a demo');
+  num=x_choose(demolist(:,1),'Choose a demo');
   if num==0 then 
      lines(oldln(1))
      return
index d4f0374..4dd5873 100644 (file)
@@ -18,7 +18,7 @@ demolist=['Car  ';
 
 
 while %t then
-  num=tk_choose(demolist(:,1),'Choose a vehicle');
+  num=x_choose(demolist(:,1),'Choose a vehicle');
   if num==0 then break,end
   select num
     case 1 then 
index 2265394..f27b3eb 100644 (file)
@@ -23,7 +23,7 @@ s=poly(0,'s');z=poly(0,'z');
 x_message(['Example of PID Design '
           'file: '+SCI+'/modules/cacsd/demos/pid.dem'])        
 
-n=tk_choose(['Continuous time';'Discrete time'],'Select time domain');
+n=x_choose(['Continuous time';'Discrete time'],'Select time domain');
 select n
  case 0
   warning('Demo stops!');return;
@@ -91,7 +91,7 @@ disp(clean(ss2tf(Tpid)),'Complementary sensitivity function');
 
 resp=['Frequency response';'Time response'];
 while %t do
-  n=tk_choose(resp,'Select response(s)');
+  n=x_choose(resp,'Select response(s)');
   if degree(Tpid(5))>0 then
     warning('Improper transfer function! D(s) set to D(0)')
     Tpid(5)=coeff(Tpid(5),0);
@@ -114,7 +114,7 @@ while %t do
       dttmax=evstr(rep);
       dt=evstr(dttmax(1));tmax=evstr(dttmax(2));
       t=0:dt/5:tmax;
-      n1=tk_choose(['Step response?';'Impulse response?'],'Simulation:');
+      n1=x_choose(['Step response?';'Impulse response?'],'Simulation:');
       if n1==0 then
        warning('Demo stops!');return;
       end
@@ -136,7 +136,7 @@ while %t do
       Tmax=evstr(rep);
       mode(-1)
       while %t do
-       n=tk_choose(['Step response?';'Impulse response?'],'Simulation:');
+       n=x_choose(['Step response?';'Impulse response?'],'Simulation:');
        select n
        case 0 then
          break
index 0d94780..c274600 100644 (file)
@@ -10,5 +10,5 @@
 
 function [num]=demo_choose(fil)
        load(fil,'choice','titl');
-       num=tk_choose(choice,titl);
+       num=x_choose(choice,titl);
 endfunction
index 10edf0b..0821df9 100644 (file)
@@ -20,7 +20,7 @@ function [] = demo_file_choice()
                        demolistlabel = "choose a demo";
                end
                
-               num = tk_choose(demolist(:,1),demolistlabel);
+               num = x_choose(demolist(:,1),demolistlabel);
                
                if num == 0 then
                        
index 191e242..2ebe8dd 100644 (file)
@@ -14,7 +14,7 @@ function []=demo_folder_choice(path,ch)
                deff('[]=demoexc(num)','exec(path+demolist(num,2),-1)')
                fs = get('figure_style');
                while %t then
-                       num=tk_choose(demolist(:,1),'Choose a demo');
+                       num=x_choose(demolist(:,1),'Choose a demo');
                        if num==0 then
                                set('figure_style',fs);
                                lines(oldln(1));
@@ -32,7 +32,7 @@ function []=demo_folder_choice(path,ch)
                if ch=='root' then
                        deff('[]=demoexec(num)','exec(demolist(num,2),-1)')
                        while %t then
-                               num=tk_choose(demolist(:,1),['Click to choose a demo';
+                               num=x_choose(demolist(:,1),['Click to choose a demo';
                                '(see also in SCIDIR/demos/...)']);
                                if num==0 then
                                        lines(oldln(1))
@@ -45,7 +45,7 @@ function []=demo_folder_choice(path,ch)
                else
                        deff('[]=demoex(num)','exec(path+demolist(num,2),-1)')
                        while %t then
-                               num=tk_choose(demolist(:,1),'Choose a demo');
+                               num=x_choose(demolist(:,1),'Choose a demo');
                                if num==0 then
                                        lines(oldln(1))
                                        return
index 6175d75..ef56d71 100644 (file)
@@ -10,7 +10,7 @@
 
 function []=demo_function_choice()
        while %t then
-               num=tk_choose(demolist(:,1),'Choose a demo');
+               num=x_choose(demolist(:,1),'Choose a demo');
                if num==0 then
                        xdel(0);
                        lines(oldln(1));
index 9970e0c..7b1a8e2 100644 (file)
@@ -19,7 +19,7 @@ x_message('trial')
 x_message(['trial';'trial1';'trial2';'trial3';'trial4';'trial6';'trial7';..
 'trial3';'trial4';'trial6';'trial7';'trial3';'trial4';'trial6';'trial7'])
 
-tk_choose(['trial';'trial1';'trial2';'trial3';'trial4';'trial7';..
+x_choose(['trial';'trial1';'trial2';'trial3';'trial4';'trial7';..
 'trial3';'trial4';'trial6';'trial7';'trial3';'trial4';'trial6'],..
 'selection (click on one item --> returns the item number)')
 
index 6b4bc5e..a79aac3 100644 (file)
@@ -243,7 +243,7 @@ function []=metro(demopath)
                 'You will go thru the following stations:';
                 string(routef);]);
       road=[];route=[];routef=[];changename=[];
-      iter=tk_choose(['yes','no'],'Another travel?');
+      iter=x_choose(['yes','no'],'Another travel?');
       set_nodes_id(TTT,emptystr(TTT),'right')
  
       TTT=[];routef=[];road=[];
index 49e11bf..f536914 100644 (file)
@@ -32,7 +32,7 @@ x_message(['      ';
           'LMITOOL uses Semidefinite Programming package SP developed by L. Vandenberghe and S. Boyd.']);
 
 while %t
-  %demo_=tk_choose(['H-infinity gain';'Output Feedback';'Sylvester equation'],...
+  %demo_=x_choose(['H-infinity gain';'Output Feedback';'Sylvester equation'],...
       ['This is a sample of LMI problems that LMITOOL can solve';
       'Select a problem (other examples are given in demos/lmitool directory)']);
   select %demo_
index d7ec524..224810f 100644 (file)
@@ -19,7 +19,7 @@ deff('[]=demoex(num)','exec(path+demolist(num,2),-1)')
 
 //xbasc();
 while %t then
-  num=tk_choose(demolist(:,1),'Choose a demo');
+  num=x_choose(demolist(:,1),'Choose a demo');
   if num==0 then 
      lines(oldln(1))
      return
index a9750e1..ff7bc65 100644 (file)
@@ -23,7 +23,7 @@ go_on=%t;
 
 while go_on then
        
-       num=tk_choose(demolist(:,1),'Choose a bike');
+       num=x_choose(demolist(:,1),'Choose a bike');
        
        if num==0 then
                go_on=%f;
index 2f70f1b..6eb4131 100644 (file)
@@ -10,7 +10,7 @@ mode(-1)
 deff("[]=demoexc(fil)","exec(""SCI/demos/simulation/dae/""+fil)")
 
 while %t do
-  n=tk_choose(["Spherical pendulum";"Sliding pendulum"],..
+  n=x_choose(["Spherical pendulum";"Sliding pendulum"],..
       "Examples of DAE");
   select n
   case 0
index aa4edbe..b73d681 100644 (file)
@@ -13,7 +13,7 @@ x_message(["Modeling of a spherical pendulum";
           "  using Lagrange formulation"]);
 
 while %t do
-  n=tk_choose(["Index 2";"Index 1";"Index 1 with stabilization"],..
+  n=x_choose(["Index 2";"Index 1";"Index 1 with stabilization"],..
       "Choose the type of the system");
   select n
   case 0
index 8a37c22..391461b 100644 (file)
@@ -13,7 +13,7 @@ x_message(["Modeling of a sliding dumped pendulum";
           "  using Lagrange formulation";
           "You can choose the curve on which the pendulum slides"]);
 while %t do
-  n=tk_choose(["Parabola";"Upside down camel"],..
+  n=x_choose(["Parabola";"Upside down camel"],..
       "Choose a curve");
   select n
   case 0
index 9e594f4..180f0bc 100644 (file)
@@ -20,7 +20,7 @@ demolist=[
 'Lotka-Volterra vector field','lotka.sce']
 
 while %t then
-  num=tk_choose(demolist(:,1),'Click to choose a demo')
+  num=x_choose(demolist(:,1),'Click to choose a demo')
   if num==0 then 
      lines(oldln(1))
      return
index 99739f0..160adfd 100644 (file)
@@ -10,7 +10,7 @@ mode(-1)
 deff("[]=demoexc(fil)","exec(""SCI/modules/others/demos/simulation/ode/""+fil)")
 
 while %t do
-  n=tk_choose(["ODE 1D","ODE 2D"],"Select a demo");
+  n=x_choose(["ODE 1D","ODE 2D"],"Select a demo");
   select n
   case 0
     break
index 147938e..ef40730 100644 (file)
@@ -18,7 +18,7 @@ x_message(["Examples of ODE''s in 1 dimension";" ";
            "  or stop everything by clicking on the RIGHT button."]);
 
 while %t do
-  n=tk_choose(["y''=y^2-t"],..
+  n=x_choose(["y''=y^2-t"],..
       "Choose an ODE"); 
   select n
   case 0
index 99cea93..e2bc349 100644 (file)
@@ -17,7 +17,7 @@ x_message(["Examples of autonomous ODE''s in 2 dimensions";" ";
            "You can start over by clicking on the LEFT button again";
            "  or stop everything by clicking on the RIGHT button."]);
 while %t do
-  n=tk_choose(["Van der Pol";"Lotka-Volterra"],..
+  n=x_choose(["Van der Pol";"Lotka-Volterra"],..
       "Choose an ODE");
   select n
   case 0
index 955060c..cdd2d5e 100644 (file)
@@ -16,7 +16,7 @@ demolist=[
 'Lorenz equation','ode4.dem']
 
 while %t then
-  num=tk_choose(demolist(:,1),'Click to choose a demo')
+  num=x_choose(demolist(:,1),'Click to choose a demo')
   if num==0 then 
      lines(oldln(1))
      return
index 58bb9c5..3b95dfa 100644 (file)
@@ -16,7 +16,7 @@ demolist=['n-pendulum',path+'npend/npend.dem';
 deff('[]=demoex(num)','exec(demolist(num,2),-1)')
 
 while %t then
-  num=tk_choose(demolist(:,1),'Choose a demo');
+  num=x_choose(demolist(:,1),'Choose a demo');
   if num==0 then 
      lines(oldln(1))
      return
index 4a023ce..a71c1b9 100644 (file)
@@ -12,7 +12,7 @@ getf(path+'show.sci');
 xbasc();
 fs = get('figure_style');
 set("figure_style","old")
-flag1=tk_choose(['Reading a precomputed trajectory';
+flag1=x_choose(['Reading a precomputed trajectory';
  'Simulation with ode (needs f77 and link. may fail, see help link)'],...
  'Simulation or Visualisation ? (click below)');
 
@@ -45,7 +45,7 @@ select flag1,
          ystr=[ 'phi';'theta';'psi';'Dpsi';'Dtheta';'Dpsi';'x';'y'];
         flag=2;
          while flag==2, [n1,n2]=size(x);
-               flag=tk_choose(['Stop';'Go on'],'Choose');
+               flag=x_choose(['Stop';'Go on'],'Choose');
                 if flag==2,x0=evstr(x_mdialog(['Initial conditions'],...
                       ystr,string(x(:,n2))));
                x=ode(x0,tmin,times,'wheel');
index ecbfb24..b444e59 100644 (file)
@@ -27,7 +27,7 @@ demos_name=[
 exec('SCI/modules/pvm/demos/pvm1.sce');
 return
 while %t do
-  n=tk_choose(demos_name,'Choose a demo')
+  n=x_choose(demos_name,'Choose a demo')
   select n
   case 0 then 
     break
index bf66999..260ec72 100755 (executable)
@@ -23,7 +23,7 @@ demolist=[
        'Simulation of an Erlang random variable','set figure_style new ;xbasc();ErlangT();'];
 
 while %t then
-       num=tk_choose(demolist(:,1),'demo of random variable simulations');
+       num=x_choose(demolist(:,1),'demo of random variable simulations');
        if num==0 then 
                lines(oldln(1));
                return
index a4bbeef..3d66b01 100644 (file)
@@ -12,7 +12,7 @@ path='SCI/modules/scilab2fortran/demos/'
 deff('[]=demoexc(fil)','exec(path+fil,-1)')
 
 while %t do
-  n=tk_choose(['Clauses, loops and operations';
+  n=x_choose(['Clauses, loops and operations';
               'Matrix concatenation';
              'Concatenations and inversions';
              'Call of simple primitives';
index 51783ae..2d513a3 100644 (file)
@@ -21,7 +21,7 @@ deff('[]=demoex(num)','exec(path+demolist(num,2),-1)')
 
 xbasc();
 while %t then
-  num=tk_choose(demolist(:,1),'Choose a demo');
+  num=x_choose(demolist(:,1),'Choose a demo');
   if num==0 then 
      lines(oldln(1))
      return
index b723730..dc44ae1 100644 (file)
@@ -24,7 +24,7 @@ demolist=[
 'Uicontrol','exec(tkpath+''uicontrol1.sce'')';
 ]
 while %t then
-  num=tk_choose(demolist(:,1),'demo of TCL/TK interface and uicontrol');
+  num=x_choose(demolist(:,1),'demo of TCL/TK interface and uicontrol');
   if num==0 then 
      lines(oldln(1))
      return