%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Sampling of Psec3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear, close all;

path   = '~/matlab_workspace/sampling_rate/';
data1  = csvread([path 'LOG_DATA_100.txt']);
data2  = csvread([path 'LOG_DATA_200.txt']);
data3  = csvread([path 'LOG_DATA_300.txt']);
data4  = csvread([path 'LOG_DATA_400.txt']);
data5  = csvread([path 'LOG_DATA_500.txt']);
data6  = csvread([path 'LOG_DATA_600.txt']);
data7  = csvread([path 'LOG_DATA_700.txt']);
data8  = csvread([path 'LOG_DATA_800.txt']);
data9  = csvread([path 'LOG_DATA_900.txt']);
data10 = csvread([path 'LOG_DATA_A00.txt']);
data11 = csvread([path 'LOG_DATA_B00.txt']);

x = linspace(0,168-4,165);
x1 = linspace(4,168,(169-4)*1000)-4;
y = data10(4:168);
test = abs(asin(y));

m = max(abs(data10(4:168)));
f = m*sin(0.38*x1+4.5);



figure(1)
hold on
plot(x,y,'b');
plot(x1,f,'r');
hold off

% figure(2)
% hold on
% plot(x,test,'b');
% plot(x1,test2,'r');
% hold off;

