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

Cse351 Lab Sheet-1

The document outlines the objectives of Lab 1, focusing on basic MATLAB commands for generating and plotting discrete-time sequences, specifically unit sample and unit step sequences. It provides commands and examples for creating these sequences, including modifications for delayed versions. Additionally, it includes questions for students to run and modify MATLAB programs related to these sequences.

Uploaded by

tareq.almatrouk
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)
5 views4 pages

Cse351 Lab Sheet-1

The document outlines the objectives of Lab 1, focusing on basic MATLAB commands for generating and plotting discrete-time sequences, specifically unit sample and unit step sequences. It provides commands and examples for creating these sequences, including modifications for delayed versions. Additionally, it includes questions for students to run and modify MATLAB programs related to these sequences.

Uploaded by

tareq.almatrouk
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

L S

AB HEET 1
LAB 1 OBJECTIVES:

⮚ Basic commands in MATLAB for signal generation


⮚ Plotting the generated signal.
Project 1.1: Unit Sample and Unit step Sequences:

Introduction:

Two basic discrete-time sequences are the unit sample sequence and the unit step

sequence. A unit sample sequence u[n] of length N can be generated using the

MATLAB command

u = [1 zeros(1,N -1)];

A unit sample sequence ud[n] of length N and delayed by M samples, where

M < N, can be generated using the MATLAB command

ud = [zeros(1,M) 1 zeros(1,N - M - 1)];

Likewise, a unit step sequence s[n] of length N can be generated using the

MATLAB command

s = [ones(1,N)];

A delayed unit step sequence can be generated in a manner similar to that used in

the generation of a delayed unit sample sequence.

Program P1 1 can be used to generate and plot a unit sample sequence.


% Program P1_1

% Generation of a Unit Sample Sequence

clf;

% Generate a vector from -10 to 20

n = -10:20;

% Generate the unit sample sequence

u = [zeros(1,10) 1 zeros(1,20)];

% Plot the unit sample sequence

stem(n,u);

xlabel(’Time index n’);

ylabel(’Amplitude’);

title(’Unit Sample Sequence’);

axis([-10 20 0 1.2]);
Questions:

Q1.1 Run Program P1 1 to generate the unit sample sequence u[n] and display it.

Q1.2 What are the purposes of the commands clf, axis, title, xlabel, and

ylabel?

Q1.3 Modify Program P1_1 to generate a delayed unit sample sequence ud[n]

with a delay of 11 samples. Run the modified program and display the sequence

generated.

Q1.4 Modify Program P1 1 to generate a unit step sequence s[n]. Run the

modified program and display the sequence generated.

Q1.5 Modify Program P1 1 to generate a delayed unit step sequence sd[n] with

an

advance of 7 samples. Run the modified program and display the sequence

generated.

END……………………..

You might also like