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]= ![](NBMLImages/Solve/Solve_5.gif)
Set up a system of small-signal equations.
In[3]:= vdiveqs = CircuitEquations[vdiv]
Out[3]= ![](NBMLImages/Solve/Solve_6.gif)
Display equations.
In[4]:= DisplayForm[vdiveqs]
Out[4]//DisplayForm= ![](NBMLImages/Solve/Solve_7.gif)
Solve only for the variable V$2.
In[5]:= Solve[vdiveqs, V$2]
Out[5]= ![](NBMLImages/Solve/Solve_8.gif)
Solve for the variables V$1 and V$2.
In[6]:= Solve[vdiveqs, {V$1, V$2}]
Out[6]= ![](NBMLImages/Solve/Solve_9.gif)
Solve for all variables.
In[7]:= solution = Solve[vdiveqs]
Out[7]= ![](NBMLImages/Solve/Solve_10.gif)
Extract value of V$2 from the list of solutions.
In[8]:= V$2 /. First[solution]
Out[8]= ![](NBMLImages/Solve/Solve_11.gif)
|