0% found this document useful (0 votes)
51 views2 pages

Program To Generate A Unit Step Function DTS

The document contains programs to generate various basic functions including unit step, unit impulse, ramp, and exponential functions. It generates these functions in both continuous and discrete time and plots the results.

Uploaded by

Rumana Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views2 pages

Program To Generate A Unit Step Function DTS

The document contains programs to generate various basic functions including unit step, unit impulse, ramp, and exponential functions. It generates these functions in both continuous and discrete time and plots the results.

Uploaded by

Rumana Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Program to generate a unit step function DTS

clc;
clear all:
close all;
t=0:1:9;
y=ones(1,10);
subplot(3,3,1);
stem(t,y);
xlabel('time');
ylabel('x(n)');
title('unit step Function');

% program to generate a unit step function CTS%


t=0:1:9;
y=ones(1,10);
subplot(3,3,2);
plot(t,y);
xlabel('time');
ylabel('x(t)');
title('unit step Function');
% program to generate a unit impulse function (dts)%
t=-10:1:10;
y=[zeros(1,10),ones(1,1),zeros(1,10)];
subplot(3,3,3);
stem(t,y);
xlabel('time');
ylabel('x(n)');
title('unit impulse Function')

% program to generate a Ramp function(cts)%


t=0:1:10;
y=t;
subplot(3,3,4);
plot(t,y,'b');
xlabel('time');
ylabel('y(n)');
% program to generate a Ramp function (dts)%
t=0:1:10;
y=t;
subplot(3,3,5);
stem(t,y,'b');
xlabel('time');
ylabel('y(n)');
title('Ramp Function');
% program to generate a exponential function(cts)%
t=0:1:10;
a=input('enter the value');
y=a^t;
subplot(3,3,6);
stem(t,y,'b');
xlabel('time');
ylabel('y(n)');

You might also like