Lab Report1
Lab Report1
Solution: The signal x(n) is a continuous signal, to plot this continuous signal in
the DT signal we use MATLAB built-in stem function. The stem function
converts continuous signal to DT signal.
3 Real valued x(n) = an,n; aR function [x n] = realx (a, n1, n2)
. exponential
n= [n1: n2];
sequence
x=a.^n;
Solution: Here question (a) is a delta signal, to plot this delta signal in
MATLAB we use a custom delta function. Question (b) continuous signal, also
there is part w(n) which is Gaussian random sequence, to plot this we use
“randn” MATLAB built-in function.
Example 1.4: Generate and plot the samples (use the stem function) of
the following sequence using MATLAB:
10
x 1 ( n )= ∑ (m+1) [ δ ( n−2 m ) −δ ( n−2 m−1 ) ]
(a) m=0 ; 0≤n≤25
Operation on DT Sequences:
Custome function for Operation on DT Sequences:
This section also we need some custom function to perform some mathematical
operation like addition, multiplication, shifting, folding, decomposition, etc. We
need to build a custom function because MATLAB has no elementary built-in
function.
Lab Evaluation:
ILE1.1: Using the evenodd function, decompose the following
sequences into their even and odd components. Plot these
components using the stem function.
Solution: In mathematics, even functions and odd functions are functions that
satisfy particular symmetry relations, concerning taking additive inverses. They
are important in many areas of mathematical analysis, especially the theory of
power series and Fourier series.
ILE1.2: Let . Generate and plot the samples
Home Work:
1. Generate and plot the samples (use the stem function) of the following
sequence using MATLAB: where
x (n)={1 ,−2,6 ,−5,4,6,8 ,10 } Hint: Use “sigadd” & “sigshift” functions.
Solution: This signal is under Operation on DT Sequences, here the x1(n) signal
has a shifting and addition function and the x(n) signal set the position of
shifting the position of the sequence, also this arrow sign means the position of
zero states.
2. (a) A unit ramp DT signal r(n) is defined as,
r(n)=¿ {n n≥0¿¿¿¿
Develop a function to implement the above signal.
(b) Use the above sequence to plot a ramp sequence for the interval -10 to 10.
Solution: ramp( x ) creates a ramp signal wave with a slope of 1 and returns the
value of the ramp at time x. To generate the ramp signal we use a custom-built
ramp function.
functions.
Solution: This signal need Operation on DT Sequences and a for loop to
generate the signal. Here for loop is used to calculate the equation of the signal
under the condition.
(i)
(ii)
Solution: Here y(n) signal has two shifting positions. The first shifting is 0 and
the second shifting is the right shift by 1, to complete the state we use the
Custom function for the generation of DT signals of the unit step function.
i)
ii)
Summary: To process the analog signal by digital, we need to convert them into
digital signals. This process is called Analog-to-Digital conversion. In this lab
session, we use some analog continuous signals to convert DT signals. Some of
them need a custom function to perform, some use MATLAB built-in functions.
This lab session includes some separate parts like, mathematically part and
generates, manipulate, and plot discrete-time signals using, generation of DT
signals and some for Operation on DT Sequences.