To calculate capacitance for a parallel plate capacitor in Matlab, you need to know the geometry of the capacitor, the permittivity of the medium between the plates and the distance between the plates. The capacitance for a parallel plate capacitor can be given as:
main.m16 chars2 lines
where C is the capacitance, epsilon is the permittivity of the medium between the plates, A is the area of each plate and d is the distance between the plates.
Here is the Matlab code to calculate the capacitance of a parallel plate capacitor given the above inputs:
main.m249 chars8 lines
In this code, the capacitance is calculated using the given inputs of permittivity, area and distance. You can change these values to simulate different parallel plate capacitors.
gistlibby LogSnag