- #1
smithc2005
- 1
- 0
Homework Statement
I have to solve for V0 , using nodal analysis. I am getting different answers in MATLAB and PSPICE. The circuit is below
2 supernodes ; or 1 big supernode Here are my nodal equations:
v1-v3 = 12
v3 - v2 = 6
(v3)/6k + (v1)/4k - 6/k = 0
Matlab output is here:
Code:
A=[1,0,-1;0,-1,1;.004,0,.006]
b=[12;6;.006]
format long
inv(A)*b
A =
1.0000 0 -1.0000
0 -1.0000 1.0000
0.0040 0 0.0060
b =
12.0000
6.0000
0.0060
ans =
7.799999999999999
-10.200000000000001
-4.200000000000001
PSPICE Schematic:
So confused!
Homework Equations
I = V/R
The Attempt at a Solution
I have gotten -4.2 from MATLAB and 7.2 from pspice.