0% found this document useful (0 votes)
20 views4 pages

Te Comps Experiment No.2 Aim: Theory: Time Scaling

The document discusses various signal operations like shifting, time scaling, addition, and subtraction. It provides theory on time scaling and reversal. Code is also included to demonstrate left and right shifting, expansion and compression, folding, addition, and subtraction of signals.
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)
20 views4 pages

Te Comps Experiment No.2 Aim: Theory: Time Scaling

The document discusses various signal operations like shifting, time scaling, addition, and subtraction. It provides theory on time scaling and reversal. Code is also included to demonstrate left and right shifting, expansion and compression, folding, addition, and subtraction of signals.
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/ 4

TE COMPS

Experiment No.2

Aim: To Perform various operations on a given signal like Shift, folding, time scaling, addition, and
subtraction.

Theory:

Time Scaling

x(At) is time scaled version of the signal x(t). where A is always positive.
|A| > 1 →→ Compression of the signal
|A| < 1 →→ Expansion of the signal

Note: u(at) = u(t) time scaling is not applicable for unit step function.

Time Reversal

x(-t) is the time reversal of the signal x(t).

Addition

Addition of two signals is nothing but addition of their corresponding amplitudes. This can be best
explained by using the following example:
Subtraction

subtraction of two signals is nothing but subtraction of their corresponding amplitudes. This can be
best explained by the following example:

Code:

#Non periodic signal


t = -0.6:0.001:0.6;
y = cos(3*pi*t) + 2*t;
subplot(6,2,1:2);
plot(t, y);
title("Non periodic signal:");
xlabel("time");
ylabel("amplitude");

#Left Shifting of non-periodic signal


y = cos(3*pi*(t+0.4)) + 2*(t+0.4);
subplot(6,2,3);
plot(t, y);
title("Left shifted signal:");
xlabel("time");
ylabel("amplitude");

#Right Shifting of non-periodic signal


y = cos(3*pi*(t-0.4)) + 2*(t-0.4);
subplot(6,2,4);
plot(t, y);
title("Right shifted signal:");
xlabel("time");
ylabel("amplitude");

#Expansion of non Periodic Signal


T1 = t/2
y = cos(3*pi*T1) + 2*T1;
subplot(6,2,5);
plot(t, y);
title("Scaled (Expanded) signal");
xlabel("x");
ylabel("amplitude");

#Compression of non Periodic Signal


T2= 2*t
y = cos(3*pi*T2) + 2*T2;
subplot(6,2,6);
plot(t, y);
title("Scaled (compressed) signal");
xlabel("time");
ylabel("amplitude");

#Folding
T3 = -t
y = cos(3*pi*T3) + 2*T3;
subplot(6,2,7);
plot(t, y);
title("Folded signal");
xlabel("time");
ylabel("amplitude");

#non periodic signal(2)


x=t.^2+2*t+1
subplot(6,2,8);
plot(t, x);
title("Non Periodic Signal (2)");
xlabel("time");
ylabel("amplitude");

y = cos(3*pi*t) + 2*t;
#Addition
z1 = x + y
subplot(6,2,9);
plot(t,z1);
title("Added signal");
xlabel("time");
ylabel("amplitude");

y = cos(3*pi*t) + 2*t;
#Subtraction

z2 = x - y
subplot(6,2,10);
plot(t,z2);
title("Subtracted signal");
xlabel("time");
ylabel("amplitude");

Output:

Conclusion:

I learned about various signal operations such as shifting, scaling, adding, subtracting, etc. and
performed them in octave.

You might also like