Answers
1)% given z(x) = r(x) + i*X(x)
% T(x) = (z(x) - 1)/(z(x) + 1)
% Case 1 here r is a constant but X value changes
% Hence we will plot different graphs for real and imaginary
% values of T(x)
clear all;
clc;
close all;
r = [0 0.25 0.5 1.0 2.0 4.0];
X = -10:0.25:10;
for l=1:6
z(l,:) = r(l) +1i*X;
T(l,:) = (z(l,:) - 1)./(z(l,:)+1);
end
%%
% here we will be plotting all the graphs for different r
figure();
plot(X/10,imag(T(1,:)));title('Imaginary component of T(x)');xlabel('imag(T(x))');ylabel('X');
hold all;
plot(X/10,imag(T(2,:)))
hold all;
plot(X/10,imag(T(3,:)))
hold all;
plot(X/10,imag(T(4,:)))
hold all;
plot(X/10,imag(T(5,:)))
hold all;
plot(X/10,imag(T(6,:)));legend('r =0.0','r = 0.25','r = 0.5','r = 1.0','r = 2.0','r =4.0')
figure();
plot(X/10,real(T(1,:)));title('Real component of T(x)');xlabel('real(T(x))');ylabel('X');
hold all;
plot(X/10,real(T(2,:)))
hold all;
plot(X/10,real(T(3,:)))
hold all;
plot(X/10,real(T(4,:)))
hold all;
plot(X/10,real(T(5,:)))
hold all;
plot(X/10,real(T(6,:)));legend('r =0.0','r = 0.25','r = 0.5','r = 1.0','r = 2.0','r =4.0')
2)
% given z(x) = r(x) + i*X(x)
% T(x) = (z(x) - 1)/(z(x) + 1)
% Case 1 here r is a constant but X value changes
% Hence we will plot different graphs for real and imaginary
% values of T(x)
clear all;
clc;
close all;
X = [0 0.25 0.5 1.0 2.0 4.0 -0.25 -0.5 -1.0 -2.0 -4.0];
r = -10:0.25:10;
for l=1:11
z(l,:) = r +1i*X(l);
T(l,:) = (z(l,:) - 1)./(z(l,:)+1);
end
%%
% here we will be plotting all the graphs for different X
figure();
plot(r/10,imag(T(1,:)));title('Imaginary component of T(x)');xlabel('imag(T(x))');ylabel('X');
hold all;
for l = 2:10
plot(r/10,imag(T(l,:)))
hold all;
end
plot(r/11,imag(T(6,:)));legend('X =0.0','X = 0.25','X = 0.5','X = 1.0','X = 2.0','X =4.0','X = -0.25','X = -0.5','X = -1.0','X = -2.0','X = -4.0')
figure();
plot(r/10,real(T(1,:)));title('Real component of T(x)');xlabel('real(T(x))');ylabel('X');
hold all;
for l = 2:10
plot(r/10,real(T(l,:)))
hold all;
end
plot(r/11,real(T(6,:)));legend('X =0.0','X = 0.25','X = 0.5','X = 1.0','X = 2.0','X =4.0','X = -0.25','X = -0.5','X = -1.0','X = -2.0','X = -4.0')
%here the -ve and + ve values of x gives same real value of T