File: loop.sce

package info (click to toggle)
scilab 4.1.2-6
  • links: PTS, VCS
  • area: non-free
  • in suites: lenny
  • size: 113,992 kB
  • ctags: 65,732
  • sloc: ansic: 406,468; fortran: 242,412; xml: 223,812; tcl: 46,703; sh: 10,945; ml: 9,441; makefile: 4,697; cpp: 1,354; java: 926; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (146 lines) | stat: -rw-r--r-- 3,742 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
//------------------------------------------------------------
// Authors Serge Steer, Jean-Baptiste Silvy Copyright INRIA
// Update 16/11/2005
//------------------------------------------------------------

// Default language
global lang
lang='FR'

// default window size;
wSize = [850,920];

// window size for the image demo
wSize_Small = [850,492] ;

// set firefox has help viewer
global %browsehelp
%browsehelp = 'firefox'

global INDEX
INDEX = make_help_index()

titles=['Scilab','Arbre genealogique', ..
	'Visualisation scientifique',..
	'Visualisation de surface Riemann','Surfaces 3D',..
        'Traitement d''image','Complex Functions', ..
        'Traitement du signal','Stationnement d''une voiture', ..
        'Stationnement d''un semi remorque',..
	'Modelisation et simulation d''une chaine', ..
        'Modelisation et simulation d''un pendule glissant', ..
        'Programmation lineaire 2', ..
        'Optimisation non lineaire','Spline'];

demos=['demo_scilab();','demo_geneal();',..
       'demo_isoSurf()',..
       'demo_riemann();','demo_3dplot()',..
       'demo_image()','demo_cmplxfun();', ..
       'demo_signal();','demo_car();', ..
       'demo_truck();','demo_pendulum();', ..
       'demo_sliding_pendulum();', ..
       'demo_optloc();', ..
       'demo_datafit();','demo_spline();'];

filesdemos=['demo_scilab.sci','Geneal.sci', ..
	    'demo_isoSurf.sci',..
	    'riemann.sci','demo_3dplot.sci',..
            'demo_image.sci','cmplxfun.sci', ..
            'demo_signal.sci','car.sci', ..
            'truck.sci','n_pendulum.sci', ..
	    'sliding_pendulum.sci', ..
	    'optloc.sci', ..
            'datafit.sci','spline.sci'];

nbDemos = size(filesdemos);
nbDemos = nbDemos(2) ;

//------------------------------------------------------------
function demo_help(key)
  browsehelp=browsehelp;
  global lang;
  lang=lang;
  //if MSDOS then
    browsehelp(gethelpfile(key+'_'+lang),key)
  //else
    //tcltk_help(gethelpfile(key),key,'demo')
  //end
  // wait for people to read
  realtimeinit(1.0);
  for i=1:1
//    realtime(i);
  end ;
endfunction
//------------------------------------------------------------
function demotodo(demoname,title)
  clc();
  printf('Demo '+title+' \n');
  execstr(demoname);
  xdel();
  clear ;
  clearglobal() ;
endfunction
//------------------------------------------------------------
function loopdemos(n)

// Max=size(demos,"*");

 for i=1:n do
   demotodo(demos(i),titles(i));
 end

endfunction
//------------------------------------------------------------
function SetPosition
  f=gcf();
  f.figure_position = [0,0];
  //f.figure_size=[400,350]*0.9;
  f.figure_size = wSize ; //[850,950] ;
  toolbar(f.figure_id,'off') ;
endfunction
//------------------------------------------------------------
function SetPosition_old
  xset("wpos",0,0);
  xset('wdim', wSize(1), wSize(2) ) ;
  toolbar(0,'off') ;
endfunction
//------------------------------------------------------------
function SetPosition_Small
  xset("wpos",0,0);
  xset('wdim', wSize_Small(1), wSize_Small(2) ) ;
  toolbar(0,'off') ;
endfunction
//------------------------------------------------------------
function removeBar()
  f = gcf();
  toolbar(f.figure_id,'off') ;
endfunction
//------------------------------------------------------------
mode(-1);

lines(0);

f= gdf() ;
f.figure_position= [0,0];
f.figure_size = wSize ;

path=get_absolute_file_path("loop.sce")
global %browsehelp;
if MSDOS then
  %browsehelp='Default Windows Browser';
else
  //%browsehelp='mozilla/netscape (gnome-moz-remote)';
end
%helps=[%helps;path "Demos"];


Maxfiles=size(filesdemos);

 for i=1:1:Maxfiles(2) do
   exec(filesdemos(i));
 end

//while %t
  loopdemos(nbDemos);
//  loopnumber=loopnumber+1;
//end
exit