[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gnucap] Expression to set value of VCVS?
From: |
al davis |
Subject: |
Re: [Help-gnucap] Expression to set value of VCVS? |
Date: |
Sat, 31 Jul 2010 08:27:35 -0400 |
User-agent: |
KMail/1.13.5 (Linux/2.6.32-trunk-amd64; KDE/4.4.5; x86_64; ; ) |
On Friday 30 July 2010, al davis wrote:
> On Friday 30 July 2010, Stefan Dröge wrote:
> > Hi, I just tried to set the value of an VCVS by using an
> > expression, but can't get it to work.
> >
> > Here I what I want to do:
> >
> >
> > If Input voltage Vin < -5mV then Vout := 0V
> > If Vin > 5mV then Vout := 5V
> > else (Vin between -5mV and 5mV) linear interpolated between
> > 0V and 5V.
> >
> >
> >
> > Here the code I tried:
> > ---
> > ECMP 11 0 10 9 FIT (-5MV,0V 5MV,5V) Order=1
> > ---
>
> You need to specify what happens out of range. If you
> don't, (with order=1) it extends the slope of the end
> intervals. You can either add flat intervals above and
> below, or use the parameters "above" and "below"
Example:
ECMP 11 0 10 9 FIT (-10MV,0V -5MV,0V 5MV,5V 10MV,5V) Order=1
or:
ECMP 11 0 10 9 FIT (-5MV,0V 5MV,5V) Order=1 above=0 below=0