Exponential Signal | Scigyan

Exponential Signal

Matlab program to generate Exponential Sequence/Signal in discrete and continuous form.

Matlab code

clc;
clear all; close all;
A=input('Enter the (+ve value) Coefficient of Exponential Sequence = ');
Zita=input('Enter the Scaling Factor of Exponential Sequence = '); 
n=input('Enter the Duration of the Sequence (in s) = ');
s=input('Enter the Sampling Interval (in ms) = '); t=0:s:n;
x=A*exp(-Zita*t); subplot(2,1,1);
plot(t,x);
title('Graph for Exponential Sequence [Continuous form]'); xlabel('Time->');
ylabel('x(t)');
subplot(2,1,2);
stem(t,x);
title('Graph for Exponential Sequence [Discrete form]'); xlabel('Time->');
ylabel('x[t]');

Command window

Enter the (+ve value) Coefficient of Exponential Sequence = 5.
Enter the Scaling Factor of Exponential Sequence = 6.
Enter the Duration of the Sequence (in s) =1. 
Enter the Sampling Interval (in ms) =.01

Figure window

Exponential-Signal
No comments:
Post a Comment

Related Posts Plugin for WordPress, Blogger...