MATLAB MATLAB Thevenin: Find Solution to Impedance Problem

  • Thread starter Thread starter studderbox
  • Start date Start date
  • Tags Tags
    Matlab Thevenin
Click For Summary
The discussion revolves around solving a Thevenin equivalent circuit using MATLAB, specifically when dealing with imaginary numbers in the equations. The user presents a circuit with a current source, an inductor (xL), and a capacitor (xC) in series, leading to two equations involving complex numbers. When attempting to solve these equations in MATLAB, the user encounters a "Matrix is singular to working precision" warning, resulting in NaN outputs. The request for a circuit diagram suggests that visual representation may be necessary for better understanding and troubleshooting of the problem.
studderbox
Messages
2
Reaction score
0
Hello all, been a fan for a long time but finally joined to ask a question =P

Solving Thevenin using MATLAB

Problem is when i add in imaginary numbers

ex: find Thevenin of circuit;
current source xL and xC all in series.

i get equations

-i + xL(i1-i2) + xC(i1-i2) = 0
xL(i2-i1) + xC(i2-i1) +/- 1 = 0

inputting into MATLAB =>

i= 0.96195 +.871557i
xL = 1ki
xC = -10ki

f=[(1000i-10000i) (-1000i+10000i); (-1000i+10000i) (1000i-10000i)]
c=[9.96195+.871557i; 1]
v1=1
is=f\c

>> results in

Warning: Matrix is singular to working precision.

ans =

NaN + NaNi
NaN + NaNi
 
Physics news on Phys.org
Can you upload the circuit diagram
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
4
Views
2K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K