lab 217 codes

lab 217 codes - A] Capacitor: 1000 microFarad Discharging...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
A] Capacitor: 1000 microFarad Discharging Capacitor: C= 1000*10^-6; %capacitance of 1000 microFarad R = 33*1000; %resistance 33 kohm V0 = 5; %maximum voltage (V0) 5V t=0:0.01:200; %time in seconds tau = R*C; % time constant in seconds Vt = V0*exp(-t/tau); Yth = log(Vt/V0); texp = [0 5 10 15 20 30 40 50 60]; %timme in sec Vexp = [4.942 4.1 3.87 3.3 2.94 2.23 1.7 1.31 1.01]; %measured voltage in V measured Yexp = log(Vexp/V0); subplot (2,1,1); plot(t,Vt,texp,Vexp, 'x' ); subplot (2,1,2); plot(t,Yth,texp,Yexp, 'x' ) coefficients =polyfit(texp,Yexp,1); %linear fitting m=coefficients (1) %slope tauexp =-1/m %time constant calculated from slope error = abs(tau-tauexp)/tau*100 %percent error m = -0.0263 tauexp = 38.0279 error = 15.2359 0 20 40 60 80 100 120 140 160 180 200 0 1 2 3 4 5 0 20 40 60 80 100 120 140 160 180 200 -8 -6 -4 -2 0
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Capacitor: 1000 microFarad Charging Capacitor: C= 1000*10^-6; %capacitance of 1000 microFarad R = 33*1000; %resistance 33 kohm V0 = 5; %maximum voltage (V0) 5V t=0:0.01:200;
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/02/2011 for the course PHYSICS 121A taught by Professor Beidehe during the Spring '11 term at NJIT.

Page1 / 12

lab 217 codes - A] Capacitor: 1000 microFarad Discharging...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online