[free-electronic-lab] Using the Alter Command in ngspice
Chitlesh GOORAH
chitlesh at fedoraproject.org
Sat Oct 2 19:46:40 UTC 2010
Hello Ashwith,
here is an example which you can base your work on:
---------------------------------------------------
alter-example
* Two resistance in series
vsig in 0 ac 1 dc 1
res in out 10k
rload out 0 1k
* conducts an ac-response with
* 2 values of load resistor, rload
.ac dec 10 1k 10k
.control
set filetype=ascii
run
plot in out
alter rload = 10k
run
plot v(in) out title alter
write S0.raw v(in)
.endc
.end
---------------------------------------------------
On Thu, Sep 30, 2010 at 5:05 AM, Ashwith Rego <ashwith at gmail.com> wrote:
> Hi
>
> >From the documentation I understand that in interactive mode, using
> the alter command one can change the device parameters. Does this also
> mean I can change the values of a resistance or voltage source in the
> netlist? If so how? I used the following circuit:
>
> Bridge Rectifier
> .options TEMP=25
> V2 2 1 SIN(0 vmax 60)
> R2 0 3 resistance
> D8 1 3 1N4007
> D6 2 3 1N4007
> D4 0 2 1N4007
> D2 0 1 1N4007
> .param resistance = 10k
> .param vmax = 5
> .end
>
> I've tried
> alter r2 = 10
> alter r2 resistance = 10
>
> But it won't work. How do I alter vmax or resistance?
>
> Thanks
> --
> Ashwith J. Rego
> -----------------
> My Webpage: http://ashwith.wordpress.com/
> Find me on LinkedIn at: http://www.linkedin.com/in/ashwith
> Follow Me on Twitter at: http://twitter.com/Louisda16th
> _______________________________________________
> electronic-lab mailing list
> electronic-lab at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/electronic-lab
>
More information about the electronic-lab
mailing list