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
|
/* autogenerated from "macros/Linear/GAIN_f.sci" */
function GAIN_f() {
GAIN_f.prototype.get = function GAIN_f() {
}
GAIN_f.prototype.set = function GAIN_f() {
x=arg1;
graphics=arg1.graphics;
exprs=graphics.exprs;
model=arg1.model;
while (true) {
[ok,gain,exprs]=scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
if (!ok) {
break
}
if (gain==[]) {
message("Gain must have at least one element");
} else {
[out,in1]=size(gain);
[model,graphics,ok]=check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs=exprs;
model.rpar=gain.slice();
x.graphics=graphics;
x.model=model;
break
}
}
}
}
GAIN_f.prototype.define = function GAIN_f() {
gain=1;
in1=1;
out=1;
model=scicos_model();
model.sim="gain";
model.in1=1;
model.out=1;
model.rpar=gain;
model.blocktype="c";
model.dep_ut=[true,None];
exprs=[strcat(sci2exp(gain)),strcat(sci2exp(in1)),strcat(sci2exp(out))];
gr_i=[];
x=standard_define([2,2],model,exprs,gr_i);
}
GAIN_f.prototype.details = function GAIN_f() {
}
}
|