0% found this document useful (0 votes)
34 views

%time Reversal (Or) Folding Operation On Unit Step Function: For If

This document demonstrates time reversal or folding of a unit step function. It generates a unit step signal from -3 to 3, then generates a folded unit step signal by reversing the condition for 1 or 0. It plots both signals on separate subplots to show how the folded signal is the time reversal of the original unit step function.

Uploaded by

AZAZEL STAR
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

%time Reversal (Or) Folding Operation On Unit Step Function: For If

This document demonstrates time reversal or folding of a unit step function. It generates a unit step signal from -3 to 3, then generates a folded unit step signal by reversing the condition for 1 or 0. It plots both signals on separate subplots to show how the folded signal is the time reversal of the original unit step function.

Uploaded by

AZAZEL STAR
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

%Time reversal (or) folding operation on Unit step function

cc

t = -3:0.001:3;

x = zeros(1,length(t));
for i = 1:length(t);
if t(i)>=0
x(i) = 1;
else
x(i) = 0;
end
end

x1 = zeros(1,length(t));
for i = 1:length(t);
if t(i)<=0
x1(i) = 1;
else
x1(i) = 0;
end
end

subplot(2,1,1)
plot(t,x)
grid
xlabel('Time - t')
ylabel('amplitude')
title('unit step signal u(t) - 21075A1008')
axis([-3.5 3.5 -1.2 1.2])

subplot(2,1,2)
plot(t,x1)
grid
xlabel('Time - t')
ylabel('amplitude')
title('Folded unitstep signal -u(t) - 21075A1008')
axis([-3.5 3.5 -1.2 1.2])

1
Published with MATLAB® R2020a

You might also like