diff --git a/FFT_heart_rate.m b/FFT_heart_rate.m index 5580dbe..1989734 100644 --- a/FFT_heart_rate.m +++ b/FFT_heart_rate.m @@ -5,7 +5,7 @@ % % Output : Fast Fourier Transform of X(t): a graph representing the Single-Sided Amplitude Spectrum of X(t) % -% Author: Maryne DEY (maryne.dey@ecam.fr) +% Author: Loic Delattre and Maryne DEY (maryne.dey@ecam.fr, loic.delattre@ecam.fr) % Date: 07/02/2023 %%%%%%%%%%%%%%%%%%%%% @@ -17,7 +17,7 @@ clc pkg load io %Normalization of the data -data = csvread('RGB_database/RGB_data.csv'); +data = frames_RGBs ()'; standard_deviation = std(data); mean_value = mean(data); @@ -26,15 +26,16 @@ for i = 1:size(data,1) endfor %Input characteristics -Fs = 970/32; % Sampling frequency = 970 images in 32 seconds +img_num = length(data); +Fs = img_num/32; % Sampling frequency = X images in 32 seconds T = 1/Fs; % Sampling period -L = 970; % Length of signal = 32 seconds +L = img_num; % Length of signal = 32 seconds t = (0:L-1)*T; % Time vector X = normalized_data_G; %Plot of the RGB data in the time domain -plot(t(1:970),X(1:970)) +plot(t(1:L),X(1:L)) title("Signal") xlabel("t (milliseconds)") ylabel("X(t)")