x1 = n.*((0.9).^n)
x2 = (0.9).^n

x = x1 + j*x2
X = fft(x)
conj(X)
fliplr(X)
fliplr(conj(X))

subplot(2,2,1); stem((0:length(X1n_ft)-1),abs(X1n_ft));
title('Magnitude Response of X_1[k] by fft');
ylabel('Magnitude');
xlabel('Time index (n)');
subplot(2,2,2); stem((0:length(X2n_ft)-1),abs(X2n_ft));
title('Magnitude Response of X_2[k] by fft');
ylabel('Magnitude');
xlabel('Time index (n)');
subplot(2,2,3); stem((0:length(X1)-1),abs(X1));
title('Magnitude Response of X_1[k] by tworealDFTs');
ylabel('Magnitude');
xlabel('Time index (n)');
subplot(2,2,4); stem((0:length(X2)-1),abs(X2));
title('Magnitude Response of X_2[k] by tworealDFTs');
ylabel('Magnitude');
xlabel('Time index (n)');

%

close all; clear;

h = [1; 2; 3; 4; 5]; x = [2; -1; 1; -1];
circonv111(h, x, 5)
conv(h, x)
N = max(length(h), length(x))
y = zeros(1, N)
lin2circonv(h, x)

%

close all; clear;

h = [1; 2; 3; 4]; x = [4; 3; 2; 1];
circonv111(h, x, 5)
conv(h, x)
circonv111(x, x, 4)
N = max(length(h), length(x))
y = zeros(1, N)

x = [5; 12; 4; 1; 2];
x3 = [x; x; x];
fft(x')
X3 = fft(x3')
ifft(X3)x

%

close all; clear;

V = [1 2 3 4 5 6 7]
X = ifftshift(V)
Y = fftshift(V);
y = [1 2];

A = [ 1 2; 3 4 ]
A1 = padarray(A, [3 2])
A2 = padarray(A, [4,2])