Professional Documents
Culture Documents
ADHC Experiment 2
ADHC Experiment 2
ADHC Experiment 2
Page No
Code :
clear
clc
close all
t=-10:0.05:10;
x0 = x(t);
subplot(3,3,1)
plot(t, x0)
xlabel('t')
ylabel('y = x(t)')
x1 = x(-t);
subplot(3,3,2)
plot(t,x1)
xlabel('t')
ylabel('y = x(-t)')
title('Mirror')
x2 = -x(t);
subplot(3,3, 3)
plot(t,x2)
xlabel('t')
ylabel('y = -x(t)')
title('Reflection')
x3=x(t-2);
subplot (3,3,4)
plot(t, x3)
Page No
axis([-10 10 -20 20])
xlabel ('t')
ylabel('y = x(t-2)')
x4 = x(t+2);
subplot(3,3,5)
plot(t,x4)
xlabel('t')
ylabel('y = x(*+2)')
x5 = x(2*t);
subplot (3,3,6)
plot(t, x5)
xlabel('t')
title('Compression')
x6 = x(t/2);
subplot (3,3,7)
plot(t, x6)
xlabel('t')
ylabel('y = x(t/2)')
title('Expansion')
x7 = x(-2*t + 3);
subplot (3,3,8)
plot(t, x7)
xlabel('t')
ylabel('y = x(-2t+3)')
Page No
title('y = x(-2t+3)')
x8 = x((-1/3)*t - 1);
subplot (3,3,9)
plot(t, x8)
xlabel ('t')
function y=x(t)
for i=1:length(t)
y(i)=t(i)/2;
y(i)=exp(t(i));
y(i)=sin(t(i));
y(i)=4*t(i)
else
y(i)=0;
end
end
end
Page No
Conclusion:
Page No