Experiment 5
Experiment 5
Experiment No. 5:
Exponential and Sinusoidal Signals
Introduction
An exponential signal or exponential function is a function that literally represents an exponentially increasing or
decreasing series.
Sinusoidal Signals are periodic functions which are based on the sine or cosine function from trigonometry.
When Sine wave starts from zero and covers positive values, reaches zero; and again covers negative values,
reaches zero, it is said to have completed one cycle or single cycle.
Objective
n=[0:10]; x=(0.9).^n;
stem(n,x);
1
Example-2
n=[-10:10]; x=(-10).^n;
stem(n,x);
2
Example-3
n=[0:10];x=exp((2+3j)*n);
subplot(1,2,1);
stem(n,real(x));
xlabel('Time Index n');ylabel('Amplitude');
title('Real Part');
subplot(1,2,2);
stem(n,imag(x));
xlabel('Time Index n');ylabel('Amplitude');
title('Imaginary Part');
3
Example-4
figure;n=[0:10]; x=3*cos(0.1*pi*n+pi/3)+2*sin(0.5*pi*n);
stem(n,x);
4
Example-5
n=[-5:5];
x=2*impseq(-2,-5,5)-impseq(4,-5,5);
subplot(2,1,1);
stem(n,x);
title('sequence in example a');
xlabel('n');
ylabel('x(n)');
5
Example-6
figure;n=[0:20];
x1=n.*(stepseq(0,0,20)-stepseq(10,0,20));
x2=10*exp(-0.3*(n-10)).*(stepseq(10,0,20)-stepseq(20,0,20));
x=x1+x2;
subplot(2,1,2);stem(n,x);title('sequence in example b');
xlabel('n');ylabel('x(n)');
6
Issues
No issues were faced during this lab.
Conlcusion
The real valued functions represents lines or direction in 1D. On the other hand, the complex valued finctions
represents a 2D plane or surfaces.
A complex exponential signal is the sum of two sinusoids that are orthogonal (90 degrees apart from each
other).
Applications
Sound and water waves, for example, can be represented as sinusoids, and simple harmonic motion—such
as that of a pendulum or a weight attached to a spring—results in a sinusoidal relationship between position and
time.
In the electrical power industry, sinusoids are the dominant signal used to transfer power. In communication
systems (cellular telephones, radio signals, etc.) the so-called carrier signals are sinusoidal.
7
Question-1
n=[0:20]; x=(cos(pi*n/3)+sin(pi*n/3));
figure;
stem(n,x);
Question-2
n=[0:10];
x=(sin(pi*n/4));
stem(n,x);
8
Question-3
n=[-20:20];
x=(sin(pi*n/4)/sin(pi/4));
stem(n,x);
9
Question-4
n=[0:100];
x=(exp(j*3*n)+exp(-j*3*n))/2;
y1=exp(j*3*n);
y2=exp(-j*3*n);
y=(y1+y2)/2
y = 1×101
1.0000 -0.9900 0.9602 -0.9111 0.8439 -0.7597 0.6603 -0.5477
subplot(3,1,1);
stem(n,y1);
subplot(3,1,2);
stem(n,y2);
subplot(3,1,3);
stem(n,x);
10
Question-5
n=[-50:50];
y=(exp(j*5*n)-exp(-j*5*n))/2;
stem(n,y);
y1=exp(j*5*n);
y2=exp(-j*5*n);
y=(y1-y2)/2;
subplot(3,1,1);
stem(n,y1);
subplot(3,1,2);
stem(n,y2);
subplot(3,1,3);
stem(n,y);
xlabel('n')
ylabel('y')
subplot(3,1,1)
11
xlim([-48.9 42.0])
ylim([-0.93 0.89])
xlabel('n')
ylabel('y1[n]')
subplot(3,1,2)
xlabel('n')
ylabel('y2[n]')
12