Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Omar Farag Rashed (1061007), Ahmed Ibrahim Alali (1052713), Nasser Mohammed Salem Ahmed (1065285), Prepared By:
Eng. Tasnim Basmaji Eng. Maha Yaghi
syms t;
x=2*sin(t);
f=x.*dirac(t-pi/2)
g=int(f,t,-inf,inf)
syms t;
f=heaviside(t-5);
diff(f,t)
Fig. 1. Unit step function
g=dirac(t+2);
int(g,t)
Code used for the first task as follows int(g,t,-inf,inf)
t=-10:0.01:10; % step is small enough to represent continuous-time Derivative of unit step is delta function
signal
f=heaviside(t); % step is small enough to represent continuous-time
signal
plot(t,f) ;
Exercise 2: Applying Signal Operations on Basic Signals
%to Shift the signal to the right by three units Code to add two signals as signals can be added and subtracted
g=heaviside(t-3); n=-10:10;
figure(1) x1= 0.5.^n;
plot(t,g) x2= 0.8.^n;
axis([-15 15 -1 2]) x=x1+x2;
%to Shift the signal to the left by four units. plot(n,x)
g=heaviside(t+4)
figure(2) y=x1-x2;
plot(t,g) plot(n,y)
axis([-15 15 -1 2])
%to Flip the signal on the y-axis as shown below. Part 2: Multiplication and Division
k=heaviside(-t); Signals multiplications and division
figure(3)
plot(t,k) n=-10:10;
axis([-15 15 -1 2]) x1= 0.6.^n;
%to Flip, multiply and shift the signal x2= 0.2.^n;
u=heaviside(-2*t+2); x=x1.*x2;
figure(4) plot(n,x)
plot(t,u) Signals must be same length to be multiplied and should not be
axis([-15 15 —1 2])
divided by zero.
Y=x1./x2;
Part 3: Maximum and Minimum
We have investigated how to get a minimum and a maximum for a II. RESULTS AND DATA ANALYSIS AND
signal using matlab INTERPRETATION
n=-20:20;
x=cos(pi*n/4);
stem(n,x)
hold
xmin=min(x);
xmax=max(x);
pmin=find(x==xmin);
pmax=find(x==xmax);
ymin=x(pmin);
ymax=x(pmax);
This is the Fourier coefficients obtained to get Fourier series and comparing with Fast Fourier transforms. Any signal
can be expanded to sine and cosine waves signal that is the basic of Fourier series and Fourier transform to be used a
lot in signals for converting the signal from time domain to frequency domain.
Signals is very important in engineering lives as we deal with a lot of types and perform a lot of operations on
it on daily basis so this task helps us to understand more in detail while seeing the results instantly and gave us
experience as we dealt with matlab software that is very useful for engineers.
References
i. Roland Priemer (1991). Introductory Signal Processing. World Scientific. p. 1. ISBN 978-9971509194. Archived from the original
on 2013-06-02.
ii. Digital signals". www.st-andrews.ac.uk. Archived from the original on 2017-03-02. Retrieved 2017-12-17.
iii. https://www.mathworks.com/products/signal.html
iv. Signals and Systems: Analysis Using Transform Methods & MATLAB. New York: McGraw Hill. ISBN 978-0073380681.