3.5.4 Solve
Command structure of Solve.
In order to symbolically solve systems of equations formulated by the function CircuitEquations, Mathematica's built-in function Solve has been extended to handle DAEObjects as well. Solve returns its result as lists of rules of the form {{ -> }, }, where the variables var are assigned symbolic expressions expr.
See also: CircuitEquations, ACAnalysis, NDAESolve.
Examples
Load Analog Insydes.
In[1]:= <<AnalogInsydes`
Define netlist description.
In[2]:= vdiv = Netlist[ {V0, {1, 0}, V0}, {R1, {1, 2}, R1}, {R2, {2, 0}, R2} ]
Out[2]=
Set up a system of small-signal equations.
In[3]:= vdiveqs = CircuitEquations[vdiv]
Out[3]=
Display equations.
In[4]:= DisplayForm[vdiveqs]
Out[4]//DisplayForm=
Solve only for the variable V$2.
In[5]:= Solve[vdiveqs, V$2]
Out[5]=
Solve for the variables V$1 and V$2.
In[6]:= Solve[vdiveqs, {V$1, V$2}]
Out[6]=
Solve for all variables.
In[7]:= solution = Solve[vdiveqs]
Out[7]=
Extract value of V$2 from the list of solutions.
In[8]:= V$2 /. First[solution]
Out[8]=
|