Coding Circuits in Matlab
4 views (last 30 days)
Im just getting started with Matlab. Can someone tell me how to write a code of a Resistor for example or a small electrical circuit consisting of two in series Resistors so the plot can be done in Simulink
thx in advance!
Prasanna Konyala on 31 Mar 2022
From my understanding, you want to create a circuit with resistors in series.
To find the equivalent resistance you can use sum() (as the sum of resisters is the equivalent resistance in series connection).
If you want to design and implement and simulate the circuits, I suggest you try Simscape Electrical toolbox. It makes the process simpler than writing whole code in Matlab.
You can leverage plot in matlab or scope in Simscape for plotting