TP3_2 now closer to finished, still not within bounds
This commit is contained in:
parent
19a477eddb
commit
bf694db39f
@ -10,7 +10,22 @@ cello = importdata('cello.mat');
|
|||||||
EEG = importdata('EEG.mat');
|
EEG = importdata('EEG.mat');
|
||||||
EEG = EEG';
|
EEG = EEG';
|
||||||
|
|
||||||
N = 256;
|
% sinal sintetico
|
||||||
|
Ls = length(sintetico);
|
||||||
|
Ts = 0.125;
|
||||||
|
Fs = 1/Ts;
|
||||||
|
Fs_vector = (0:Ls-1)/Ls * Fs;
|
||||||
|
|
||||||
|
% sinal cello
|
||||||
|
Lc = length(cello.x);
|
||||||
|
Tc = cello.dt;
|
||||||
|
Fc = 1/Tc;
|
||||||
|
Fc_vector = (0:Lc-1)/Lc * Fc;
|
||||||
|
|
||||||
|
% sinal EEG
|
||||||
|
Le = length(EEG);
|
||||||
|
Fe = 100;
|
||||||
|
Fe_vector = (1:Le-1)/Le * Fe;
|
||||||
|
|
||||||
figure(1)
|
figure(1)
|
||||||
|
|
||||||
@ -19,9 +34,8 @@ plot(sintetico);
|
|||||||
title('sinal sintetico');
|
title('sinal sintetico');
|
||||||
|
|
||||||
subplot(2,1,2)
|
subplot(2,1,2)
|
||||||
DFT_Xa = fft(sintetico, N+1);
|
DFT_synth = fft(sintetico, Ls);
|
||||||
DFT_Xa = DFT_Xa(1 : (N+1)/2);
|
plot(Fs_vector, abs(DFT_synth))
|
||||||
plot(X((N+1)/2, 0, 1),abs(DFT_Xa))
|
|
||||||
xlabel('\omega/\pi'), ylabel('|X(\omega)|'), title('DFT sintetico em [0, \pi]')
|
xlabel('\omega/\pi'), ylabel('|X(\omega)|'), title('DFT sintetico em [0, \pi]')
|
||||||
|
|
||||||
figure(2)
|
figure(2)
|
||||||
@ -31,9 +45,8 @@ plot(cello.x);
|
|||||||
title('sinal cello');
|
title('sinal cello');
|
||||||
|
|
||||||
subplot(2,1,2)
|
subplot(2,1,2)
|
||||||
DFT_cello = fft(cello.x, N+1);
|
DFT_cello = fft(cello.x, Lc);
|
||||||
DFT_cello = DFT_cello(1 : (N+1)/2);
|
plot(Fc_vector, abs(DFT_cello))
|
||||||
plot(X((N+1)/2, 0, 1),abs(DFT_cello))
|
|
||||||
xlabel('\omega/\pi'), ylabel('|X(\omega)|'), title('DFT cello em [0, \pi]')
|
xlabel('\omega/\pi'), ylabel('|X(\omega)|'), title('DFT cello em [0, \pi]')
|
||||||
|
|
||||||
figure(3)
|
figure(3)
|
||||||
@ -43,9 +56,8 @@ plot(EEG);
|
|||||||
title('sinal EEG');
|
title('sinal EEG');
|
||||||
|
|
||||||
subplot(2,1,2)
|
subplot(2,1,2)
|
||||||
DFT_EEG = fft(EEG, N+1);
|
DFT_EEG = fft(EEG, Le-1);
|
||||||
DFT_EEG = DFT_EEG(1 : (N+1)/2);
|
plot(Fe_vector, abs(DFT_EEG))
|
||||||
plot(X((N+1)/2, 0, 1),abs(DFT_EEG))
|
|
||||||
xlabel('\omega/\pi'), ylabel('|X(\omega)|'), title('DFT EEG em [0, \pi]')
|
xlabel('\omega/\pi'), ylabel('|X(\omega)|'), title('DFT EEG em [0, \pi]')
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user