Alternating Current Analysis 275
Example 3.7
Let the current in the RC circuit shown in Figure 3.56 be i(t) = 5 sin(200t) A. Create the
script fi le curr_vol_RC that returns the plots of v(t) versus t and i(t) versus t, over the
range 0 ≤ t ≤ 0 .1 s.
MATLAB Solution
% Script file: curr _ vol _ RC
clf
W = 200;
R = 0.5e5;
C = 10e-8;
Ang = 1/(W*C*R);
t = 0:.001:.1;
V = (R^2+(1/W*C)^2)^.5*5*sin(W.*t-atan(Ang));
I =5*sin(W.*t);
subplot(2,1,1)
plot(t,V)
ylabel(‘Ampitude[v(t)]’);
xlabel(‘time in seconds’);
title(‘v(t) vs. t ’)
subplot(2,1,2)
plot(t,I)
title(‘i(t) vs. t ’)
xlabel(‘time in seconds’);
ylabel(‘Amplitude[i(t)]’)
The script fi le curr_vol_RC is executed and the returning plots are shown in Figure 3.57.
C= 10*10−^8 F
R = 0.5*10^5 Ω
i(t) = 5 sin(200 t) A
v(t)
FIGURE 3.56
Network of Example 3.7.