Lab Assignment 322
Lab Assignment 322
Assignment
Task 1:
a) Unit Impulse Signal: The continuous-time unit impulse
signal is denoted by δ(t) and is defined as − δ(t)={1fort=0
0forteq0. Hence, by the definition, the unit impulse signal
has zero amplitude everywhere except at t = 0. At the
origin (t = 0) the amplitude of impulse signal is infinity so
that the area under the curve is unity.
b) Unit Step Signal :The step signal or step function is that type
of standard signal which exists only for positive time and
it is zero for negative time. In other words, a signal x(t)
is said to be step signal if and only if it exists for t > 0
and zero for t < 0. The step signal is an important signal
used for analysis of many systems.
Lab 1
Name: Introduction To Matlab Soffware
Using Matlab Toolbar
Use new script tool then we are showing command window and program
window.Any program are showing.
Run section cleck program will be done
Lab 2
Name: Ploting Unit Inpulse Funtion by Matlab
a) Unit Impulse Signal: The continuous-time unit impulse signal is
denoted by δ(t) and is defined as − δ(t)={1fort=0 0forteq0. Hence,
by the definition, the unit impulse signal has zero amplitude
everywhere except at t = 0. At the origin (t = 0) the amplitude of
impulse signal is infinity so that the area under the curve is unity.
Program:
n=-6:6;
delta_n=[0,0,0,0,0,0,1,0,0,0,0,0,0];
stem(n,delta_n); xlabel('Time');
ylabel('Amplitude');
Program:
clear all;
close all;
clc;
N1=-40;
N2=40
N=0;
x=N1:N2;
y=x.*(x-N>=0)
figure;
stem(x,y,'b','Linewidth',7);
xlabel('\bf\color{red}\fontsize{20} Samples');
ylabel('\bf\color{red}\fontsize{20} Amplitude');
title('\bf\color{black}\fontsize{20} Ramp Singnal on Matlab'); grid
on;
Program:
%first unit step signal%
n=-20:20; unit_nl=n>=0;
subplot (3,1,1); stem(n,
unit_nl); axis([-5 5 -2
2]); xlabel('Time
Samples');
ylabel('Amplitude');
title('\bf\color{black}\fontsize{10}First unit step signal');
Lab 5
Z transform implementation by matlab
The Z-transform (ZT) is a mathematical tool which is used to convert the
difference equations in time domain into the algebraic equations in zdomain.In
mathematics and signal processing, the Z-transform converts a discretetime signal, which
is a sequence of real or complex numbers, into a complex frequencydomain (the z-domain
or z-plane) representation. It can be considered a discrete-time equivalent of the Laplace
transform (the s-domain or s-plane).
Program:
X=0;
Program:
syms n; f=sin(n);
r=ztrans(f);
disp("z transform using function"); disp(r); program
will be done bleow: