You are on page 1of 3

%%Expt no=2 %Draw the fft plot of the eeg and ecg signal to study the frequency %Spectrum

of both the signals. clear; load ecg; ecg=val(1,:); load eeg; eeg=val(1,:);

%% figure(1); subplot(2,1,1),plot(ecg); title('ecg signal');

subplot(2,1,2) plot(abs(fft(ecg))) title('frequency spectrum of ecg signal '); xlabel('frequency(Hz)'); figure(2); subplot(2,1,1),plot(eeg); title('eeg signal'); subplot(2,1,2) plot(abs(fft(eeg))) title('frequency spectrum of eeg signal '); xlabel('frequency(Hz)');

You might also like