pkg load control io signal;

M = xlsread('test.xlsx');
A = M(200:end,:);
t = A(:,1);
x = A(:,2);
y = A(:,3);
z = A(:,4);

xx = x - sum(x)/length(x);
xx5 = 5*xx;


ti = zeros(length(t),1);
step_size = ((t(length(t))-t(1))/(length(t)-1));
for v = 1:length(t)
   ti(v) = t(1)+step_size*(v-1);
end

xi = interp1(t,xx,ti);
yi = interp1(t,xx5,ti);

px = periodogram(xi,[],[],100);
py = periodogram(yi,[],[],100);

plot(px)
plot(py);

xlswrite('test.xlsx',px);
