You are on page 1of 6

GENERATION OF SIGNALS

1. GENERATION OF CONTINUOUS TIME SIGNALS

Step signal:

clc;
clear all;
close all;
t=0:1:10;
y=ones(1,11);
plot(t,y);
title('Generation of continuous signal- step signal- 18EER033-JEEVANANTH.S');
xlabel('Timeperiod');
ylabel('Amplitude');

Ramp signal

clc;
clear all;
close all;
a=input('Enter the amplitude: ');
t=0:1:10;
y=a*t;
plot(t,y);
title('Generation of continuous signal- ramp signal-18EER033-JEEVANANTH.S');
xlabel('Timeperiod');
ylabel('Amplitude');

Enter the amplitude: 5


Parabolic signal:

clc;
clear all;
close all;
a=input('Enter the amplitude: ');
t=-5:1:5;
y=a*(t.^2);
plot(t,y);
title('Generation of continuous signal- parabolic signal-18EER033-JEEVANANTH.S');
xlabel('Timeperiod');
ylabel('Amplitude');

Enter the amplitude: 5

Sine signal:
clc;
clear all;
close all;
a=input('Enter the amplitude: ');
f=input('Enter the frequency: ');
t=0:0.001:0.1;
y=a*sin(2*3.14*f*t);
plot(t,y);
title('Generation of continuous signal- sine signal-18EER033-JEEVANANTH.S');
xlabel('Timeperiod');
ylabel('Amplitude');

Enter the amplitude: 230


Enter the frequency: 50
Exponential signal: case1 (i) a<0
clc;
clear all;
close all;
a=input('Enter the Amplitude : ');
c=input('Enter the Constant value : ');
n=-5:1:5;
y=c*exp(a*n);
plot(n,y);
title('Generation of Continuous Time Signals -18EER033-JEEVANANTH.S');
xlabel('Time period');
ylabel('Amplitude');
Enter the amplitude: -1
Enter the constant: 10

Exponential signal: case1 (ii) a>0

clc;
clear all;
close all;
a=input('Enter the Amplitude : ');
c=input('Enter the Constant value : ');
n=-5:1:5;
y=c*(a.^n);
plot(n,y);
title('Generation of Continuous Time Signals -18EER033-JEEVANANTH.S');
xlabel('Time period');
ylabel('Amplitude');
Enter the amplitude: 2
Enter the constant: 5
Exponential signal: case1 (iii) a=0
clc;
clear all;
close all;
a=input('Enter the Amplitude : ');
c=input('Enter the Constant value : ');
n=-5:1:5;
y=c*exp(a*n);
plot(n,y);
title('Generation of Continuous Time Signals -18EER033-JEEVANANTH.S');
xlabel('Time period');
ylabel('Amplitude');
Enter the amplitude: 0
Enter the constant: 5

Exponential signal: Case 2: C is complex and a is imaginary

clc;
clear all;
close all;
a=input('Enter the Amplitude : ');
c=input('Enter the Constant value : ');
n=-5:1:5;
y=c*exp(a*n);
plot(n,y);
title('Generation of Continuous Time Signals -18EER033-JEEVANANTH.S');
xlabel('Time period');
ylabel('Amplitude');
Enter the amplitude: 2i

Enter the constant: 5+2i


Exponential signal: Case 3:C and a are complex with i) a positive real

clear all;

close all;
a=input('Enter the Amplitude : ');
c=input('Enter the Constant value : ');
n=-5:1:5;
y=c*exp(a*n);
plot(n,y);
title('Generation of Continuous Time Signals -18EER033-JEEVANANTH.S');
xlabel('Time period');
ylabel('Amplitude');
Enter the amplitude: 5+6i

Enter the constant: 6+5i

Exponential signal: Case 3:C and a are complex with ii) a negative real

clear all;
close all;
a=input('Enter the Amplitude : ');
c=input('Enter the Constant value : ');
n=-5:1:5;
y=c*exp(a*t);
plot(n,y);
title('Generation of Continuous Time Signals -18EER033-JEEVANANTH.S');
xlabel('Time period');
ylabel('Amplitude');
Enter the amplitude: 5-6i

Enter the constant: 6+5i

You might also like