3 // Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 // See the file ../license.txt
22 function [x,y,typ]=OpAmp(job,arg1,arg2)
29 graphics=arg1.graphics;
33 [ok,OLGain,SatH,SatL,exprs]=scicos_getvalue(..
34 msprintf(_("Set %s block parameters"), "Operational Amplifier"),..
36 "Positive saturation voltage";
37 "Negative saturation voltage"]),..
38 list("vec",1,"vec",1,"vec",1),exprs);
42 model.equations.parameters(2)=list(OLGain,SatH,SatL)
52 // S=['OLGain';'SatH';'SatL'];
62 mo.inputs=["in_p";"in_n"];
64 mo.parameters=list(S,Z);
66 model.in=ones(size(mo.inputs,"*"),1);
67 model.out=ones(size(mo.outputs,"*"),1);
71 x=standard_define([3 5],model,exprs,gr_i)
72 x.graphics.in_implicit=["I";"I"]
73 x.graphics.out_implicit=["I"]