In: Electrical Engineering
Create a matlab program that calculates equivalent cpacitance and charge by asking the user whether the circuit is in paraller , series or combination and then asks for the values of capacitances and voltage. After that it calculates the equivalent capacitance.
I am first attaching MATLAB code, which does the following:
MATLAB code:
Output, the command window:
I have tested the code for both series and parallel connections, if you need any extra addons or if i missed something in the code, please comment, i will update the solution accordingly.