0% found this document useful (0 votes)
49 views4 pages

United International University: Lab Report-1

This lab report discusses signal processing concepts and applications in MATLAB. It includes shifting and adding signals using sigshift and sigadd functions. Specific tasks include shifting and adding stepped and ramp signals, downsampling a cosine signal, convolving a signal with itself using a for loop, and shifting and adding unit step and sinusoidal signals.

Uploaded by

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

United International University: Lab Report-1

This lab report discusses signal processing concepts and applications in MATLAB. It includes shifting and adding signals using sigshift and sigadd functions. Specific tasks include shifting and adding stepped and ramp signals, downsampling a cosine signal, convolving a signal with itself using a for loop, and shifting and adding unit step and sinusoidal signals.

Uploaded by

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

United International University

Lab Report-1

Course Title: DSP Laboratory

Course Code:EEE312

Submitted to: Shimul Ikram Shimul

Submitted by: Mohammad Nadeem


ID: 021133074

Date of submission: 2/10/2016

Lab Report 1 DSP


1)
n=-3:4;
x=[1 -2 6 -5 4 6 8 10];
[x11,n11]=sigshift(x,n,-2);
[x22,n22]=sigshift(x,n,4);
[x33,n33]=sigadd(3*x11,n11,x22,n22);
[x1,n1]=sigadd(x33,n33,-2*x,n);
stem(n1,x1);

2) a)

function [x n]= ramp(n1,n2);


n=[n1:n2];
x=(n>=0).*n;

b)
[x n]=ramp(-10,10);
stem(n,x)

3)
n= -50:50;
x=cos(0.25*pi*n)
subplot(2,1,1)
stem(n,x)
y=downsample(x,5);
n2=[-10:10]
subplot(2,1,2)
stem(n2,y)

4)
4)
n=0:7;
x=[1 -2 6 -5 4 6 8 10];
y = zeros(1,13)
n2=0:length(y)-1;
stem(n2,y)
for k=1:5
[x1 n1]=sigshift(x,n,k)
y = sigadd(x1,n1,y,n2);
subplot(3,2,k)
stem(n2,y)
end

5)i)
n=-25:25;
x=5*(u(0,-25,25)-u(20,-25,25))
[x1 n1] = sigshift(x,n,1);
[y n2] = sigadd(x,n,-x1,n1)
stem(n2,y)

5)ii)
n=0:100;
x=sin((pi.*n)./25).*(u(0,0,100)-u(100,0,100));
[x1 n1] = sigshift(x,n,1)
[y n2] = sigadd(x,n,-x1,n1)
stem(n2,y);

You might also like