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 _ fplot of [ILT of F(s)] versus t (numerical solution)Time tTime tplot of f(t) versus t (symbolic solution)plot of F(s) versus s (symbolic)s (frequency)AmplitudeAmplitudeAmplitude100
01234 567891 001234 6789100024602461234567891055FIGURE 4.19
Plots of R.4.121.