Question
1- Introduction to the sequences in MATLAB .All signals are considered causal and finite length. . Sequence is used to model discrete or digital signal. ele lzeros(1,51 1 2eros: 1, 5)). B generate a unit saaple s- lzeros(1,3, ones(1,6 8generate step signal tarp lat(2,1,11; xLabel : 'tire step aubplet(2,1,2 :a) ') . ylabel 'Amplitude') , Question 1: Modify code Lab1 C1 to generate a pulse sequence in unit amplitude between time samples 3 to 6 (n-3:6). It is called rectangular pulse Modify code Lab1 _C1 to generate an periodic sequence in the form of (1,0,-1). Display it in 3 periods in subplot 2.
Explanation / Answer
1.Clear
Close all
Clc
Amplitude=1;
T=(0:0.01:1);
Y=Amplitude*square(T,1);
Plot(T,Y);
axis([3 6,0 1]);
2.
Clear
Close all
Clc
T=3;
X=1:-0.1:-1;
Y=2*mod(X,T);
Plot(X,Y);