0% found this document useful (0 votes)
10 views2 pages

Ee256 Assignment 1

The document is an assignment for EE256, focusing on signals and systems, authored by Aradhya VG. It includes MATLAB code for convolution of two functions, x(t) and g(t), along with a detailed tabulation of integrating time ranges and functions to be integrated. Additionally, it requests the mathematical expression for specific ranges and verification through MATLAB.

Uploaded by

Sumukh Kini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Ee256 Assignment 1

The document is an assignment for EE256, focusing on signals and systems, authored by Aradhya VG. It includes MATLAB code for convolution of two functions, x(t) and g(t), along with a detailed tabulation of integrating time ranges and functions to be integrated. Additionally, it requests the mathematical expression for specific ranges and verification through MATLAB.

Uploaded by

Sumukh Kini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

EE256 ASSIGNMENT 1

Name: Aradhya VG
Section: S2
Roll Number: 221EE209
Registration Number: 2210059
Subject Code: EE256
Subject Name: Signals and Systems

Q1) Sketch y(t) = x(t) * g(t) for the range –4 to 4 clearly.


A) Matlab Code:

x = inline(['(-t-5).*(t>=-5 & t<-4)+(t+4).*(t>=-4 & t<-3)'+(-t-3).*(t>=-3 & t<-2) +(t+2).*(t>=-2 & t<-
1)'+(-t-1).*(t>=-1 & t<0) +(t).*(t>=0 & t<1)'+(-t+1).*(t>=1 & t<2)+(t-2).*(t>=2 & t<3)'+(-t+3).*(t>=3
& t<4)+(t-4).*(t>=4 & t<5)'],'t');

g = inline('((t-1).*(2/3)).*(t>=1 & t<=4)+3*(t>=5 &t<=7)');


dtau = .005; %defines an incremental value for the convolution
tau= -8:dtau:8; %defines the integrating ranges for the convolution
ti= 0; %initialising the index counter, i.e. pointer to the solution to DE in y
tvec = -4:.1:4; %defines time range for the output presentation
y=NaN*zeros(1,length(tvec)); %NAN is not a number (no value is defined as o/p)
for t = tvec % Start of loop for convolution, here t is scalar value varies in loop
ti=ti+1; % incrementing the counter pointer for the solution to DE in y
xh= x(tau).* g(t-tau); % Multiplication of two signals
y(ti) = sum(xh.*dtau); % integration
subplot(3,1,1),plot(tau,x(tau),'k-',tau,g(t-tau),'k--',t,0,'ok');

axis([tau(1) tau(end) -3 3]);


subplot(3,1,2),plot(tvec,y,'k',tvec(ti),y(ti),'ok');

axis([tau(1) tau(end) -3 3]);


drawnow;
end
subplot(3,1,3)
plot(tvec,y)
xlabel('t -->')
ylabel('Convolution')

Output:
Q2)Also tabulate for all continuous time ranges, clearly the “integrating time ranges”
(upper and lower limits) & “function to be integrated” respectively. so that the
mathematical expression to y(t) = x(t)*g(t) (consider x(τ) and g(t- τ )) can be found out.

continuous Integrating function to be


time ranges time ranges integrated
[-1 ,0] [-4+t,-1+t] 2/3*(t-tau-1)*[(tau+2)u(-1-
tau)u(2+tau) + (-tau-3)u(-2-
tau)u(3+tau) + (tau+4)u(-3
tau)u(4+tau) +(-1-tau)u(-
1+tau)u(-tau)]
[0,1] [-4+t,-1+t] 2/3*(t-tau-1)*[(tau+2)u(-1-
tau)u(2+tau) + (-tau-3)u(-2-
tau)u(3+tau) + (tau)u(tau)u(1-
tau)+(-1-tau)u(- 1+tau)u(-tau)]
[1,2] [-4+t,-1+t] 2/3*(t-tau-1)*[(tau+2)u(-5-
tau)u(6+tau)+(-1-tau)u(-
1+tau)u(-tau) +(1-tau)u(-
1+tau)u(2-tau)
+(tau)u(tau)u(1-tau)]

*Here rectangular pulse part of g(t) is not considered while integrating as the effective area of
x(t) under period 2 is 0 .So multiplying it with constant value won’t make a change.

Q3) Find the mathematical expression for at least two ranges and verify the result
using MATLAB.

You might also like