load touch
w = -pi : (2 * pi) / 2047 : pi;
t1 = x2(1 : 1000);
t2 = x2(1101 : 2100);
t3 = x2(2201 : 3200);
t4 = x2(3301 : 4300);
t5 = x2(4401 : 5400);
t6 = x2(5501 : 6500);
t7 = x2(6601 : 7600);
X21 = fftshift (fft(t1, 2048));
X22 = fftshift (fft(t2, 2048));
X23 = fftshift (fft(t3, 2048));
X24 = fftshift (fft(t4, 2048));
X25 = fftshift (fft(t5, 2048));
X26 = fftshift (fft(t6, 2048));
X27 = fftshift (fft(t7, 2048));
figure(1)
subplot(2, 1, 1);
plot(w, abs(X21)); hold
plot(0.5346, 1 : 500, 'r' );
plot(1.0247, 1 : 500, 'r' );
axis([0.5, 1.25, 0, 500]);
title('X21');
text(0.5346, 400,'peak value : 0.5346');
text(1.0247, 400,'peak value : 1.0247');
subplot(2, 1, 2);
plot(w, abs(X22)); hold
plot(0.5906, 1 : 500, 'r' );
plot(1.0247, 1 : 500, 'r' );
axis([0.5, 1.25, 0, 500]);
title('X22');
text(0.6535, 400,'peak value : 0.5906');
text(1.1328, 400,'peak value : 1.0247');
figure(2)
subplot(2, 1, 1);
plot(w, abs(X23)); hold
plot(0.5346, 1 : 500, 'r' );
plot(1.1328, 1 : 500, 'r' );
axis([0.5, 1.25, 0, 500]);
title('X23');
text(0.5346, 400,'peak value : 0.5346');
text(1.1328, 400,'peak value : 1.1328');
subplot(2, 1, 2);
plot(w, abs(X24)); hold
plot(0.5346, 1 : 500, 'r' );
plot(0.9273, 1 : 500, 'r' );
axis([0.5, 1.25, 0, 500]);
title('X24');
text(0.5346, 400,'peak value : 0.5346');
text(0.9273, 400,'peak value : 0.9273');
figure(3)
subplot(2, 1, 1);
plot(w, abs(X25)); hold
plot(0.7217, 1 : 500, 'r' );
plot(1.0247, 1 : 500, 'r' );
axis([0.5, 1.25, 0, 500]);
title('X25');
text(0.7217, 400,'peak value : 0.7217');
text(1.0247, 400,'peak value : 1.0247');
subplot(2, 1, 2);
plot(w, abs(X26)); hold
plot(0.7217, 1 : 500, 'r' );
plot(1.0247, 1 : 500, 'r' );
axis([0.5, 1.25, 0, 500]);
title('X26');
text(0.7217, 400,'peak value : 0.7217');
text(1.0247, 400,'peak value : 1.0247');
figure(4)
subplot(2, 1, 1);
plot(w, abs(X27)); hold
plot(0.7217, 1 : 500, 'r' );
plot(1.0247, 1 : 500, 'r' );
axis([0.5, 1.25, 0, 500]);
title('X27');
text(0.7217, 400,'peak value : 0.7217');
text(1.0247, 400,'peak value : 1.0247');