PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

368 Practical MATLAB® Applications for Engineers


plot (t,f)
title (‘ plot of [ ILT of F(s)] vs. t (numerical solution)’)
ylabel (‘Amplitude’); xlabel (‘time t’);

disp(‘*************RESULTS************’)
syms s t;
disp(‘F(s) is given by:’)
F = (3*s+25)/(s^2+3*s+2);
pretty(F)
disp(‘The ILT of F(s)is given by:’)
FILT = ilaplace(F);
pretty (FILT)
subplot (3,1,2)
ezplot (FILT,[0 10])
title (‘ plot of f(t) vs. t (symbolic solution) ‘)
xlabel (‘time t’); ylabel(‘Amplitude’)
subplot(3,1,3)
ezplot (F,[0 10])
title (‘ plot of F(s) vs.s (symbolic) ‘)
xlabel (‘s (frequency)’)
ylabel(‘Amplitude’)
disp(‘**********************************’)

The script fi le F_ f is executed and the results are indicated as follows.


>> F _ f

plot of [ILT of F(s)] versus t (numerical solution)

Time t

Time t

plot of f(t) versus t (symbolic solution)

plot of F(s) versus s (symbolic)

s (frequency)

Amplitude

Amplitude

Amplitude

10

0
01234 567891 0

01234 678910

0

0

2

4

6

0

2

4

6

12345678910

5

5

FIGURE 4.19
Plots of R.4.121.

Free download pdf