Narayan

Untitled

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