PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Fourier and Laplace 415


FIGURE 4.62
Circuit diagram of Example 4.12.

C = 1F
R = 1 Ω V 0 (t)
Vi(t) Vi(s)

V 0 (s)

ANALYTICAL Solution
Part 1

Hs
Vs
Vs

R
RsC

s
i s

()
()
() (/ )







0

(^11)
Part 2
Vs
s
Vs
s
i()() vt()[ ()]Vs eutt() ( )
11
1
001 0 4



  • £from Table .2
    Part 3
    MATLAB Solution
    % Script file :analysis _ RC
    t =-1:0.1:8;
    t0 = 0;
    ut =stepfun(t,t0);
    vo =exp(-t);
    vot =vo.ut;
    subplot(2,1,1);
    plot(t,vot,t,vot,’o’);
    title(‘vo(t) vs. t,numerical solution’);
    xlabel(‘time(sec)’);
    ylabel(‘ Amplitude (volts)’);
    axis([-1 5 -.5 1.3]);
    syms s x
    Hs = s/(s+1);
    Vis =1/s;
    Vos = Hs
    Vis;
    vot = ilaplace(Vos);
    subplot(2,1,2);
    ezplot(vot);title(‘vo(t) vs. t, symbolic solution’);
    ylabel(‘ Amplitude (volts)’);
    xlabel(‘time(sec)’);
    axis([0 5 -.5 1.3]);
    The script fi le analysis_RC is executed and the results are shown in Figure 4.63.

Free download pdf