Professional Documents
Culture Documents
For Example, Let's Examine The Following Electrical Circuit (Resistors Are in Ohms, Currents in Amperes, and Voltages Are in Volts)
For Example, Let's Examine The Following Electrical Circuit (Resistors Are in Ohms, Currents in Amperes, and Voltages Are in Volts)
We can describe
this type of circuits with linear equations, and then we can solve the linear system using Matlab.
For example, let's examine the following electrical circuit (resistors are in ohms, currents in
amperes, and voltages are in volts):
We can describe the circuit with the following system of linear equations:
-3i1 + i2 + 2i3 = -1
i1 - 6i2 + 3i3 = 0
2i1 + 3i2 - 6i3 = -6
This system can be described with matrices in the form Ax = b, where A is the matrix of the
coefficients of the currents, x is the vector of unknown currents, and b is the vector of constants on
the right of the equalities.
A = [-3 1 2
1 -6 3
2 3 -6];
b = [-1 0 -6]';
i = A\b
The Matlab answer is:
i=
3.0000
2.0000
3.0000