/* autogenerated from "macros/Linear/GAIN_f.sci" */ function GAIN_f() { GAIN_f.prototype.define = function GAIN_f() { this.gain = 1; in1 = 1; out = 1; model = scicos_model(); model.sim = "gain"; model.in1 = 1; model.out = 1; model.rpar = this.gain; model.blocktype = "c"; model.dep_ut = [true,false]; exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]]; gr_i = []; this.x = standard_define([2,2],model,exprs,gr_i); return new BasicBlock(this.x); } GAIN_f.prototype.details = function GAIN_f() { return this.x; } GAIN_f.prototype.get = function GAIN_f() { var options = { gain:["Gain",this.gain], } return options; } GAIN_f.prototype.set = function GAIN_f() { this.gain = parseFloat(arguments[0]["gain"]) this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { [ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]); if (!ok) { break; } if (this.gain==[]) { message("Gain must have at least one element"); } else { [out,in1] = size(this.gain); [model,graphics,ok] = check_io(model,graphics,in1,out,[],[]); if (ok) { graphics.exprs = exprs; model.rpar = this.gain.slice(); this.x.graphics = graphics; this.x.model = model; break; } } } return new BasicBlock(this.x); } }