Exp 3

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1: x(t)=e−t and x(−t)=et plot(t, x1);

t = -1:0.01:1; title('Original Signal: x(t) = sin(t)');

x1 = exp(-t); xlabel('Time (sec)');

x1(t < 0) = 0; ylabel('Amplitude (volt)');

grid on;

x2 = exp(t);

x2(t > 0) = 0; subplot(2,1,2);

plot(t, x2);

subplot(2,1,1); title('Time Reversed Signal: x(-t) = -sin(t)');

plot(t, x1); xlabel('Time (sec)');

title('Original Signal: x(t) = e^{-t} (for t \ge 0)'); ylabel('Amplitude (volt)');

xlabel('Time (sec)'); grid on;

ylabel('Amplitude (volt)');

grid on; 3: x(t)=cos⁡(2t) and x(−t)=cos⁡(2t)


t = -1:0.01:1;

subplot(2,1,2); x1 = cos(2*t);

plot(t, x2);

title('Time Reversed Signal: x(-t) = e^{t} (for t \ x2 = cos(2*t);


le 0)');
figure;
xlabel('Time (sec)');
subplot(2,1,1);
ylabel('Amplitude (volt)');
plot(t, x1);
grid on;
title('Original Signal: x(t) = cos(2t)');

2: x(t)=sin⁡(t) and x(−t)=−sin⁡(t)


xlabel('Time (sec)');

ylabel('Amplitude (volt)');
t = -1:0.01:1; grid on;
x1 = sin(t); subplot(2,1,2);

plot(t, x2);
x2 = -sin(t); title('Time Reversed Signal: x(-t) = cos(2t)');

xlabel('Time (sec)');
figure; ylabel('Amplitude (volt)');
subplot(2,1,1); grid on;
1: x(t)=t2 and x(t−2)=(t−2)2 xlabel('Time (sec)');

t = -1:0.01:1; ylabel('Amplitude (volt)');

x1 = t.^2; grid on;

x2 = (t-2).^2; subplot(2,1,2);

plot(t, x2);

figure; title('Left Shifted Signal: x(t+1) = u(t+1)');

subplot(2,1,1); xlabel('Time (sec)');

plot(t, x1); ylabel('Amplitude (volt)');

title('Original Signal: x(t) = t^2'); grid on;

xlabel('Time (sec)');

ylabel('Amplitude (volt)'); 3: x(t)=et and x(t−3)=et−3


grid on; t = -1:0.01:1;

x1 = exp(t);

subplot(2,1,2);

plot(t, x2); x2 = exp(t-3);

title('Right Shifted Signal: x(t-2) = (t-2)^2');

xlabel('Time (sec)'); figure;

ylabel('Amplitude (volt)'); subplot(2,1,1);

grid on; plot(t, x1);

title('Original Signal: x(t) = e^t');

2: x(t)=u(t) and x(t+1)=u(t+1) xlabel('Time (sec)');

t = -1:0.01:1; ylabel('Amplitude (volt)');

x1 = double(t >= 0); grid on;

x2 = double(t >= -1); subplot(2,1,2);

plot(t, x2);

figure; title('Right Shifted Signal: x(t-3) = e^{t-3}');

subplot(2,1,1); xlabel('Time (sec)');

plot(t, x1); ylabel('Amplitude (volt)');

title('Original Signal: x(t) = u(t)'); grid on;


1: x(t)=t and x(2t)=2t xlabel('Time (sec)');

t = -1:0.01:1; ylabel('Amplitude (volt)');

x1 = t; grid on;

x2 = 2*t; subplot(2,1,2);

plot(t, x2);

figure; title('Scaled Signal (expanded): x(0.5t) =


sin(0.5t)');
subplot(2,1,1);
xlabel('Time (sec)');
plot(t, x1);
ylabel('Amplitude (volt)');
title('Original Signal: x(t) = t');
grid on;
xlabel('Time (sec)');

ylabel('Amplitude (volt)');
3: x(t)=e−t and x(3t)=e−3t
grid on;
t = -1:0.01:1;

x1 = exp(-t);
subplot(2,1,2);

plot(t, x2);
x2 = exp(-3*t);
title('Scaled Signal (compressed): x(2t) = 2t');
figure;
xlabel('Time (sec)');
subplot(2,1,1);
ylabel('Amplitude (volt)');
plot(t, x1);
grid on;
title('Original Signal: x(t) = e^{-t}');

2: x(t)=sin⁡(t) and x(0.5t)=sin⁡(0.5t)


xlabel('Time (sec)');

ylabel('Amplitude (volt)');
t = -1:0.01:1;
grid on;
x1 = sin(t);

subplot(2,1,2);
x2 = sin(0.5*t);
plot(t, x2);

title('Scaled Signal (compressed): x(3t) = e^{-


figure; 3t}');
subplot(2,1,1); xlabel('Time (sec)');
plot(t, x1); ylabel('Amplitude (volt)');
title('Original Signal: x(t) = sin(t)'); grid on;
1: x[n]=2n and x[−n]=2−n ylabel('Amplitude (volt)');

n = 0:49; grid on;

x1 = 2.^n;
subplot(2,1,2);

x2 = 2.^(-n); stem(n, x2);

title('Time Reversed Signal: x[-n] = \delta[-n]');

figure; xlabel('n');

subplot(2,1,1); ylabel('Amplitude (volt)');

stem(n, x1); grid on;

title('Original Signal: x[n] = 2^n');

xlabel('n'); 3: x[n]=sin⁡(2πn) and x[−n]=−sin⁡(2πn)


ylabel('Amplitude (volt)'); n = 0:49;

grid on; x1 = sin(2*pi*n);

subplot(2,1,2); x2 = -sin(2*pi*n);

stem(n, x2); figure;

title('Time Reversed Signal: x[-n] = 2^{-n}'); subplot(2,1,1);

xlabel('n'); stem(n, x1);

ylabel('Amplitude (volt)'); title('Original Signal: x[n] = sin(2\pi n)');

grid on; xlabel('n');

ylabel('Amplitude (volt)');

2: x[n]=δ[n] and x[−n]=δ[−n] grid on;

n = -10:10;

x1 = (n == 0); subplot(2,1,2);

stem(n, x2);

x2 = (n == 0); title('Time Reversed Signal: x[-n] = -sin(2\pi


n)');
figure;
xlabel('n');
subplot(2,1,1);
ylabel('Amplitude (volt)');
stem(n, x1);
grid on;
title('Original Signal: x[n] = \delta[n]');
1: x[n]=n and x[n−2]=n−2
xlabel('n');
n = 0:49; ylabel('Amplitude (volt)');

x1 = n; grid on;

x2 = n - 2; subplot(2,1,2);

stem(n, x2);

figure; title('Left Shifted Signal: x[n+1] = u[n+1]');

subplot(2,1,1); xlabel('n');

stem(n, x1); ylabel('Amplitude (volt)');

title('Original Signal: x[n] = n'); grid on;

xlabel('n');

ylabel('Amplitude (volt)'); 3: x[n]=3n and x[n−1]=3n−1


grid on; n = 0:49;

x1 = 3.^n;
subplot(2,1,2);

stem(n, x2); x2 = 3.^(n-1);


title('Right Shifted Signal: x[n-2] = n-2');

xlabel('n'); figure;
ylabel('Amplitude (volt)'); subplot(2,1,1);
grid on; stem(n, x1);

title('Original Signal: x[n] = 3^n');


2: x[n]=u[n] and x[n+1]=u[n+1] xlabel('n');

n = -10:10; ylabel('Amplitude (volt)');

x1 = double(n >= 0); grid on;

x2 = double(n >= -1); subplot(2,1,2);

stem(n, x2);

figure; title('Right Shifted Signal: x[n-1] = 3^{n-1}');

subplot(2,1,1); xlabel('n');

stem(n, x1); ylabel('Amplitude (volt)');

title('Original Signal: x[n] = u[n]'); grid on;

xlabel('n'); 1: x[n]=n and x[2n]=2n


n = 0:49; grid on;

x1 = n;

subplot(2,1,2);

x2 = 2*n; stem(n, x2);

title('Scaled Signal (expanded): x[0.5n] = sin(8\


pi n)');
figure;
xlabel('n');
subplot(2,1,1);
ylabel('Amplitude (volt)');
stem(n, x1);
grid on;
title('Original Signal: x[n] = n');

xlabel('n');

ylabel('Amplitude (volt)');
3: x[n]=n2 and x[3n]=(3n)2

grid on; n = 0:49;

x1 = n.^2;

subplot(2,1,2);

stem(n, x2); x2 = (3*n).^2;

title('Scaled Signal (compressed): x[2n] = 2n'); figure;

xlabel('n'); subplot(2,1,1);

ylabel('Amplitude (volt)'); stem(n, x1);

grid on; title('Original Signal: x[n] = n^2');

xlabel('n');

2: x[n]=sin⁡(4πn) and x[0.5n]=sin⁡(8πn)


ylabel('Amplitude (volt)');

grid on;
n = 0:49;

x1 = sin(4*pi*n);
subplot(2,1,2);

stem(n, x2);
x2 = sin(8*pi*n);
title('Scaled Signal (compressed): x[3n] =
figure;
(3n)^2');
subplot(2,1,1);
xlabel('n');
stem(n, x1);
ylabel('Amplitude (volt)');
title('Original Signal: x[n] = sin(4\pi n)');
grid on;
xlabel('n');

ylabel('Amplitude (volt)');

You might also like