PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

410 Practical MATLAB® Applications for Engineers


FTxsym =simplify(FTx) ; % X(w)
FTh = fourier(exp(- 3*x)*sym(‘Heaviside(x)’)+
exp(3*x)*sym(‘Heaviside(-x)’));
FTy = FTx*FTh;
FTysym=simplify(FTy) ; %Y(w)
Disp(‘*****************************************************’)
disp(‘******* S y m b o l i c **** R e s u l t s*********’)
disp(‘ ‘)
disp(‘The Fourier Transf. of x(t) is:’)
disp(FTxsym)
pretty(FTxsym)
disp(‘The Fourier Transf. of h(t) is:’)
disp(FTh)
pretty(FTh)
disp(‘The Fourier Transf. of y(t) is:’)
disp(FTysym)
pretty(FTysym)
disp(‘*****************************************************’)
figure(4)
subplot(2,1,1)
ezplot(abs(FTxsym));
title(‘Symbolic plot of the Fourier Transf. of X(t) vs. w ‘)
ylabel(‘Magnitude’);xlabel(‘ frequency (in rad/sec)’);axis([-6 6 0 6])
subplot(2,1,2)
ezplot(abs(FTysym),[-6 6]);title(‘Symbolic plot of the Fourier Transf. of Y(t)
vs. w ‘)
ylabel(‘Magnitude’);xlabel(‘frequency w (in rad/sec)’);
axis([-6 6 0 5]);
The script fi le syst_anal is executed and the results are as follows (Figures 4.56 through
4.59):

>> syst _ anal

******************************************************
******* S y m b o l i c **** R e s u l t s*********

The Fourier Transf. of x(t) is:
-2*sin(pi*w)/w
sin(pi w)
-2 ---------
w

The Fourier Transf. of h(t) is:
1/(3+i*w)+1/(3-i*w)
1 1
------- + --------
3 + i w 3 - i w

The Fourier Transf. of y(t) is:
12*sin(pi*w)/w/(3+i*w)/(-3+i*w)
sin(pi w)
12 -----------------------
w (3 + i w) (-3 + i w)
*****************************************************
Free download pdf