mtech vlsi

2
Unit step signal n=-10:1:10; y3=(n>=0); figure; subplot(2,2,1); plot(y3,n); xlabel('tie'); ylabel('aplitu!e'); title('unit step signal'); 1. UnitStepFunction: Matlab Code: "l" "learall "loseall #=30; $ no of saple n=-#:1:# x=%&eros(1,#) 1 ones(1,#) ste(n,x); xlabel(' ie' ); ylabel(' plitu!e' ); title('Unit *tep'); 2. Unit Impulse Function: Matlab Code: "l" "learall "loseall #=30; $ no of saple n=-#:1:# x=%&eros(1,#) 1 &eros(1,#) ste(n,x); xlabel(' ie' ); ylabel(' plitu!e' ); title('Unit +pulse');

Upload: manasa

Post on 06-Oct-2015

223 views

Category:

Documents


0 download

DESCRIPTION

egter

TRANSCRIPT

Unit step signaln=-10:1:10; y3=(n>=0); figure; subplot(2,2,1); plot(y3,n); xlabel('time'); ylabel('amplitude'); title('unit step signal');

1. UnitStepFunction:Matlab Code:clcclearallcloseallN=30;% no of samplen=-N:1:Nx=[zeros(1,N) 1 ones(1,N)]stem(n,x);xlabel('Time');ylabel('Amplitude');title('Unit Step');

2.Unit Impulse Function:Matlab Code:clcclearallcloseallN=30;% no of samplen=-N:1:Nx=[zeros(1,N) 1 zeros(1,N)]stem(n,x);xlabel('Time');ylabel('Amplitude');title('Unit Impulse');

3.Unit Ramp Function:

Matlab Code:clcclearallcloseallN=30;% no of samplen=-N:1:Nx=[zeros(1,N) 0 n(1,32:61)]stem(n,x);xlabel('Time');ylabel('Amplitude');

title('Unit Ramp');