MATLAB code that finds currents and potential differences in any AC/DC circuit with potential sources.
- circuit.m: class for the circuit object. Allows the user to define a circuit, solve for its parameters and get the results.
- dioGraph.m: class for the directed graph object that stores the circuit geometry.
- Example 1: Simple DC circuit. Learn how to define the circuit geometry, potential sources and resistances, and get the results.
- Example 2: AC circuit. See how impedance and phasors are given to the solver.