The Department of Electronics and
Familiarization with Basic CT/DT functions
The basic objective of this lab was to be familiar with MATLAB, one of the most famous tools used in Signal Analysis and Processing.
The impulse function, also known as Dirac delta function or Dirac impulse, is defined by | |
Ramp and Step Signals
The step signal is zero for negative input and one for positive. Thus, it is defined by
Whereas, provided a width parameter, if a step signal is modeled than its a ramp signal characterized by following mathematical relation. Hence, a step signal is that ramp which has width parameter zero. | |
A Rectangular signal is defined by
1. Plot the basic signal using matlab.
a. Impulse Signal
y =[zeros(1,(N–1)/2) 1 zeros(1,(N–1)/2)]
x =[-( N - 1 ) /2 ) : ( N – 1 ) /2 ]
An assumed infinity of 15 points was taken and the impulse signal of having infinite magnitude at a single time instant was generated.
b. Unit Step Signal
y=[zeros(1,(N-1)/2) 1 ones(1,(N-1)/2)]
Plotted such that magnitude at the negative axis is zero and that at the positive axis is unity.
c. Ramp Signal
y=[zeros(1,(N-1)/2) ,0 , 1: (N-1)/2]
y=0 for x0
d. Rectangular Signal
y=[zeros(1,(N-1)/3) ones(1,N -(N-1)/3*2) zeros(1,(N-1)/3)] x=[-(N-1)/2:(N-1)/2]
2. Plot the following continuous time signals.
| | | | | |
b. Plot the same signal taking 'a' as pure imaginary.
Oscillating outputs where observed when a was made imaginary. Its due to the sinosoidal component present in the relation, which can be explained clearly by writingh the Euler's relation below.
c. Plot the signal: x(t)=Cerk (Cos(w*k +θ ) + j*Sin(w*k +θ ))
t = [-N:0.1:N];
c = 2; w = 10; theta = 5;
i = 1;
x(i) = abs(c) * exp(r * k)* (cos(w*k+theta) + j*sin(w*k+theta)); i=i+1;
title('C=2, w=10, Theta=5 and r=0'); xlabel('t'); ylabel('x(t)');
Oscillation with rising magnitude
3. Plot the DT exponential function on: x(n)=an , a=|a|ejθ
A=1; % magnitude |a|
n = [-N:0.1:N];
theta = 5;
i = 1;
x(i) = power(a,n(i));
stem(n, x); title(''); xlabel('n'); ylabel('x(n)');
Hence, a Sinusoidal signal was plotted using discrete calculations.
C = -1
a = -1+i
C = +1
a = -1+i
Please join StudyMode to read the full document