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
|
/* autogenerated from "macros/Events/IFTHEL_f.sci" */
function IFTHEL_f() {
IFTHEL_f.prototype.define = function IFTHEL_f() {
model = scicos_model();
model.sim = list("ifthel",-1);
model.in1 = 1;
model.in2 = 1;
model.intyp = -1;
model.evtin = 1;
model.evtout = [[1],[1]];
model.blocktype = "l";
model.firing = [-1,-1];
model.dep_ut = [true,false];
model.nmode = 1;
model.nzcross = 1;
gr_i = [];
exprs = [[string(model.in1)],[string(model.nmode)]];
x = standard_define([3,3],model,exprs,gr_i);
}
IFTHEL_f.prototype.details = function IFTHEL_f() {
}
IFTHEL_f.prototype.get = function IFTHEL_f() {
}
IFTHEL_f.prototype.set = function IFTHEL_f() {
x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
if (exprs==[]) {
exprs = string(1);
}
if (size(exprs,"*")==1) {
exprs[2-1] = string(1);
}
while (true) {
[ok,inh,nmod,exprs] = scicos_getvalue("Set parameters",[["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
model.dep_ut = [true,false];
if (nmod!=0) {
nmod = 1;
}
if (inh!=1) {
inh = [];
}
[model,graphics,ok] = check_io(model,graphics,1,[],inh,[[1],[1]]);
if (ok) {
graphics.exprs = exprs;
model.evtin = inh;
model.sim[2-1] = -1;
model.nmode = nmod;
model.nzcross = nmod;
x.graphics = graphics;
x.model = model;
break;
}
}
}
}
|