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

Signal Generation and Plotting: Performance Objectives

This lab manual discusses generating and plotting basic discrete-time sequences in OCTAVE. It describes how to generate a unit sample sequence, unit step sequence, and delayed versions of each using OCTAVE commands. The document provides an OCTAVE script that generates a unit sample sequence, and instructions to modify the script to generate the other sequence types.

Uploaded by

Aamir Hasan Khan
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)
57 views2 pages

Signal Generation and Plotting: Performance Objectives

This lab manual discusses generating and plotting basic discrete-time sequences in OCTAVE. It describes how to generate a unit sample sequence, unit step sequence, and delayed versions of each using OCTAVE commands. The document provides an OCTAVE script that generates a unit sample sequence, and instructions to modify the script to generate the other sequence types.

Uploaded by

Aamir Hasan Khan
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

LAB MANUAL

LAB EXPERIMENT - 01: SIGNAL GENERATION AND PLOTTING.

SIGNAL GENERATION AND PLOTTING


PERFORMANCE OBJECTIVES:
Upon completion of this laboratory exercise, the student technicians/engineers will be able to:
1. Represent Unit Sample Sequence in OCTAVE.
2. Represent Unit Step in OCTAVE.
3. Write scripts in OCTAVE.
EQUIPMENT:

1 OCTAVE equipped PC

DISCUSSION:
BASIC SEQUENCES
Two basic discrete-time sequences are the

1. Unit Sample (impulse) sequence and


2. Unit Step sequence.

A unit sample sequence u[n] of length N can be generated using the OCTAVE 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
OCTAVE 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 OCTAVE command
>>s = [ones(1,N-1)];
A delayed unit step sequence can be generated in a manner similar to that used in the generation of a delayed unit
sample sequence.
OCTAVE SCRIPT
% Program P1.1
% Generation of a Unit Sample Sequence

clc;
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]);

CSE 351 – SIGNALS & SYSTEMS ANALYSIS.


1
LAB MANUAL
LAB EXPERIMENT - 01: SIGNAL GENERATION AND PLOTTING.

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?
Modify Program P1.1 to generate a delayed unit sample sequence ud[n] with a delay of 11 samples.
Q1.3
Run the modified program and display the sequence generated.
Modify Program P1 1 to generate a unit step sequence s[n].
Q1.4
Run the modified program and display the sequence generated.
Modify Program P1 1 to generate a delayed unit step sequence sd[n] with an advance of 7 samples.
Q1.5
Run the modified program and display the sequence generated.

YANBU UNIVERSITY COLLEGE


2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy