Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

LAB ACTIVITY 4- Unit Sample Sequence using Function Method

Name: Gomez, Christian Benedict B._______________ Date Performed: 10-10-2022________________

Section: BSECE 3-1______________________________ Date Submitted: 10-10-2022________________

Professor: Sir Edwin Arboleda______________________Time Allocation: 30 minutes

Objectives:

This activity allows the students to plot a unit sample sequence using Octave or Matlab

Watch and Learn

Unit Sample Sequence

Step 1: Make a folder wherein the functions will be save.

Example:
The folder
“Octave
Functions” was
created in
Desktop folder.
Step 2. Make the folder you created in step 1 , the folder in “Current Directory “ of
Octave.

Step 3. Go to “”File”  “New”  “New Function”

Step 4: Type the name of your new function.


Example -unitsample.
This is the function name of your unit sample. Then click “Ok”.
Step 5: This will appear. Take note that the function name is “unitsample.m”.

Step 6: Type your function.


Step 6: Then save your function to your chosen folder.
Step 7: After saving the function , press the “Command Window” tab.
Step 8. Type the following in the “Command Window”.

1. What is the screen output after executing the code above :


2. Plot x(n) = δ (n-3) , -10 < n < 10.

5. What is the screen output after executing the code above :


6. Plot x(n) = δ (n+3) , -10 < n < 10.

7. What is the screen output after executing the code above :


POST ACTIVITY 1.1

Within Class Hours:

Go to pdfdrive.com , from books about Digital Signal Processing plot 10 examples of Unit
Sample sequence. Copy the problem from the book and plot it using Octave as we have done in
this activity.

Cite your sources using Mendeley, IEEE format.

Submission is on or before the end of class meeting.

You might also like