help-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnucap] gnucap development snapshot 2008-02-11


From: Orestes Mas
Subject: Re: [Help-gnucap] gnucap development snapshot 2008-02-11
Date: Wed, 13 Feb 2008 13:15:37 +0100
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)

El Wednesday 13 February 2008 05:03:05 al davis va escriure:
> On Tuesday 12 February 2008, Orestes Mas wrote:
> > Can the parameters be swept in any way?
> >
> > For example, to model a voltage divider using a potentiometer
> > I enter the following circuit:
> >
> > .param alpha=0
> > Vg 1 0 DC 10V
> > R1 1 2 {10k*(1-alpha)+0.1}
> > R2 2 0 {10k*alpha+0.1}
> > .print op v(2)
> > **Here I'd like to sweep the 'alpha' parameter from 0 to 1 to
> > simulate the change of the potentiometer's cursor position.
> > I've tried with the "sweep" and "dc" commands, with no luck.
>
> I was wondering how long it would take for someone to ask for
> that ..   about a day.
>
> I can't think of an easy way yet, without some coding.  It's
> coming.

Haha, never mind. I've been waiting some time for this, so I can wait a little 
more.

Meanwhile I've found a workaround:
Vg 1 0 DC 10V
R1 1 2 10k
R2 2 0 0.1
print op v(2)
sweep 5 R1=10k,0.1 R2=0.1,10k
>>>op
>>>go

And that do the trick.

> You can do:
>
> .param alpha=.1
> .op
> .param alpha=.2
> .op
> .param alpha=.3

Yes, this is useful too, in certain situations (few steps).

Thanks.

Orestes.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]