I'm trying to find an equation that replicates the values of the voltage of the capacitor in a circuit with a resistor of 100k ohms.
I have the equations but I dont know how to code them in matlab.
So far I've accomplished the first half of the cycle but I can't get the other half right.
Pls help.
It is a square voltage source with a freecuency of 1000Hz and the two voltages are 10 and 0.
function y = fcn(u,t0) if u < t0 y = 0; else if u > 0.5e-3 y = 9.93*exp(-10000*(u-t0)); else y = -10*exp(-10000*(u-t0))+10; end end
Best Answer