Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C=100*10^(-6);
- R1 = 360;
- R2 = 720;
- Vcc = 5;
- t=[0:1*10^-3:500*10^-3];
- vCc = Vcc*(1-exp (-t./((R1+R2)*C)))
- vCd = Vcc*exp (-t./((R1+R2)*C));
- title ("Charge and Discharge curves of a capacitor");
- plot (t, vCc, "color", "red", "linewidth", 2);
- hold on
- plot (t, vCd, "color", "blue", "linewidth", 2);
- xlabel ("t[s]");
- ylabel ("vC[V]");
Advertisement
Add Comment
Please, Sign In to add comment