cfunc.mod
来自「xspice所支持的更为详细和全面的仿真电路示例程序」· MOD 代码 · 共 40 行
MOD
40 行
/* $Id: cfunc.tpl,v 1.1 91/03/18 19:01:04 bill Exp $ */
void ucm_real_gain (ARGS)
{
double *in;
double *out;
double in_offset;
double gain;
double out_offset;
double delay;
double ic;
/* Get the input and output pointers */
in = INPUT(in);
out = OUTPUT(out);
/* Get the parameters */
in_offset = PARAM(in_offset);
gain = PARAM(gain);
out_offset = PARAM(out_offset);
delay = PARAM(delay);
ic = PARAM(ic);
/* Assign the output and delay */
if(ANALYSIS == DC) {
*out = ic;
if(INIT)
cm_event_queue(delay);
}
else {
*out = gain * (*in + in_offset) + out_offset;
OUTPUT_DELAY(out) = delay;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?