Umal-qura university



Yüklə 0,73 Mb.
səhifə24/30
tarix23.12.2023
ölçüsü0,73 Mb.
#156716
1   ...   20   21   22   23   24   25   26   27   ...   30
Signal and Systems Manual - v2full

OBJECTIVES OF THE LAB

This lab aims at the understanding of:





  • Generating unit impulse and unit step sequences

  • Basic signal operations







    1. GENERATING UNIT IMPULSE AND UNIT STEP SEQUENCES

Use matlab commands zeros and ones to generate unit impulse and unit step sequences.


Example: Unit Impulse Sequence

n=‐10:10;


% unit impulse x1=[zeros(1,10) 1 zeros(1,10)];




stem(n,x1,'filled'); xlabel('sample #'); ylabel('signal amplitude'); title('Unit impulse'); axis([‐10 10 ‐1 2]);
Example: Unit Step Sequence

n= ‐10:10;


%unit step x1=[zeros(1,10) ones(1,11)];


stem(n,x1,'filled'); xlabel('sample #'); ylabel('signal amplitude'); title('Unit step');


axis([‐10 10 ‐1 2]);


TASK 1
Using ones function, plot the signum sequence over interval ‐10≤n≤10. It can be defined as:



    1. BASIC SIGNAL OPERATIONS



      1. Signal Shifting

clc clear all close all


n=0:0.002:4;


x=sin(2*pi*1*n);

subplot(2,1,1); plot(n,x,'linewidth',2); title('Original Signal'); xlabel('Time'); ylabel('Signal Amplitude'); axis([‐3 4 ‐1 1]);


grid;

subplot(2,1,2); plot(n‐1,x,'linewidth',2); title('Advanced signal'); xlabel('Time'); ylabel('Signal Amplitude');


axis([‐3 4 ‐1 1]);
grid;


Task 1


Delay the original signal given in above example by 1 sec. Plot both the delayed & original signal on the same figure.


      1. Yüklə 0,73 Mb.

        Dostları ilə paylaş:
1   ...   20   21   22   23   24   25   26   27   ...   30




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə