JAYPEE INSTITUTE OF INFORMATION TECHNOLOGY
BTECH (SEMESTER-III)
SIGNALS AND SYSTEMS LAB
18B15EC214
ODD SEM- 2026
SUBMITTED TO: Professor Vineet Khandelwal
SUBMITTED BY:
NAME: Harshal Rastogi
ENROLLMENT NO.: 2501020029
BATCH: A1
COURSE OUTCOMES
COURSE OUTCOMES: Cognitive Levels
At the end of the course, students will be able to
C270.1 Demonstrate MATLAB for generation of
continuous time signals & discrete time
Understanding Level
signals and SIMULINK for realization of
(C2)
systems described by di erential &
di erence equations.
C270.2 Apply MATLAB programming concepts to
solve engineering and mathematical
problems using decision-making Applying Level (C3)
statements, loops, functions, and data
visualization techniques.
C270.3 Analyze di erent LTI systems with
frequency domain representation of
Analyzing Level (C4)
continuous time and discrete time
periodic and aperiodic signals.
C270.4 Evaluate and develop e icient MATLAB
programs to model engineering systems,
Evaluating Level (C5)
interpret computational results, and
validate solutions.
INDEX
[Link] EXPERIMENT DATE REMARKS
1. Introduction to MATLAB and its various
applications.
2. Introduction to continuous time signals
3. Introduction to Discrete time signals.
4. Introduction to even and odd parts of
signal.
5. Write MATLAB codes for generating and
plotting various combinations of two
signals and perform time scaling, time
shifting, time reversal and multiple
transformations.
6. Write MATLAB codes for finding the
Signal Energy or power of signals.
7. To calculate the convolution sum of two
discrete time signals.
8. To calculate the convolution integral of
two continuous-time signals.
9. Realization of LTI system and verify it.
EXPERIMENT 1
Aim: Introduction to MATLAB and its various applications.
Theory:
A. MATLAB Basics
1. MATLAB Windows
This is where MATLAB puts you when you launch it.
a. Command Window - Use the Command Window to enter variables and to run functions and M-file
scripts.
b. Current Directory - You can run, M-files, rename them, delete them, etc., using right click of
mouse.
c. Workspace - You add variables to the workspace by using functions, running M-files, and loading
saved workspaces.
d. Command History - You can view previously run statements, as well as copy and execute selected
statements
2. Figure Window - MATLAB directs graphics output to a window that is separate from the Command
Window.
3. Editor Window - Use the Editor/Debugger to create and debug M-files, which are programs you
write to run MATLAB functions.
The MATLAB environment
consists of MATLAB
Desktop, a figure window,
and an editor window. The
figure window and the editor
window appear only when
invoked with appropriate
commands.
B. Input-Output
Data Type -
There are 15 fundamental data types in MATLAB. Each of these data types is in the form of a matrix or
array. This matrix or array is a minimum of 0-by-0 in size and can grow to an n-dimensional array of any
size.
Dimensioning- Automatic in MATLAB.
Case sensitivity- Sensitive
Output- Displayed on the command window unless MATLAB is directed otherwise. A semicolon at the
end of a command suppresses output.
Command History - Presents a log of the statements most recently run in the Command Window.
C. File Types
M-files -You write your program in an ordinary ASCII text file. The file extension of .m makes this a
MATLAB M-file.
Mat files - The save command saves the MATLAB arrays currently in memory to a binary disk file
called a MAT-file. The term is used because these files have the extension .mat.
Fig files -Binary files with a .fig extension that can be opened again in MATLAB as figures.
P files - You can save a preparsed version of a function or script, called P-code files, for later MATLAB
sessions using the pcode function.
Mex files- A .mex extension to the filenames.
D. Scripts
Scripts are collection of command executed in sequence, written in editor and saved as M-files (.m
extension).
E. Making and Manipulating Variables
» a = 10 Initializes
» cool = 13/3; To suppress output
• Two types of arrays
o matrix of numbers (either double or complex)
o cell array of objects (more advanced data structure)
» column = [4; 2; 7; 4] row = [1 2 5.4 -6.6]
>> size(row) >> size(column) Gives number of rows and column and vice versa
>>length (row) >> length(column) To get a vector's length
»r = rank(m); »d = det(m); »E = inv(m);
»str = ['Hello, I am ''John']; Strings are character vectors
• Arithmetic operations ( + ,- , *, /)
• Exponentiation (^)
• Complicated expressions, use parentheses if unclear
» transpose(a) or »a' or »a.
G. Built-in Functions
»sqrt(2) , »log(2), log10(0.23) , »cos(1.2), atan(-.8) , »exp(2+4*i) , »round(1.4), floor(3.3),
ceil(4.23) , »angle(i), abs(1+i);
»s = sum (row); »p = prod (row);
• operators (* , '/') have two modes of operations
o element-wise: use the dot: '.*' '. /' '.^' . BOTH dimensions must match (unless one is scalar)
o standard:
»A = rand(5) % shorthand for 5x5 matrix
•
H. Plotting
»x = linspace(0,4*pi,10); »y = sin(x); »plot( x , y);
I. Polynomials
If vector P describes a polynomial ax3 + bx2 + cx + d
•P = [1 0 -2] represents the polynomial x2 - 2
» r = roots(P) % r is a vector of length N
J. Numerical Di erentiation
»dydx = di (y) / di (x); % di computes the first di erence
•Can also operate on matrices
»mat = [1 3 5; 4 8 6];
»dm = di (mat,1,2) % first di erence of mat along the 2nd dimension, dm=[2 2;4 -2]
K. Numerical Integration
Write a function ' y = myFun(x)' where y = cos (exp(x) +x.^2 - 1)
»q1 = quad ('myFun', 0, 10); % q1 is the integral of the function myFun from 0 to 10
•Trapezoidal rule (input is a vector)
»x = 0:0.01:pi;
»z = trapz(x, sin(x)); %z is the integral of sin(x) from 0 to pi
L. Symbolics
Symbolic variables are a type, like double or char, to make symbolic variables, use sym
»a=sym ('1/3');