function [xStoreTest,yStoreTest,intFactor,decFactor,err] = loadData(x,FsInput)
err = 0;
Fs = 100;
L = lcm(FsInput,Fs);
intFactor = L/FsInput;
decFactor = L/Fs;
len = length(x);

x = interp(x,intFactor);
x = downsample(x,decFactor);

ANN = [];
ANN(1:length(x)) = 1;

window = 5000;
n = numel(x);

xStoreTest = {};
yStoreTest = {};

ANN = transpose(ANN);
yStoreTest = mat2cell(ANN,diff([0:window:n-1,n]));
xStoreTest = mat2cell(x,diff([0:window:n-1,n]));

minAdd = ceil(3*decFactor/intFactor);
if length(yStoreTest{end}) < 3
   txt = sprintf('Přidejte ke vstupním datům alespoň %d vzorků.', minAdd);
   disp(txt)
   err = 1;
   return
end   
for k = 1:length(yStoreTest)
    yStoreTest{k}(end) = 3;
    yStoreTest{k}(end-1) = 2;
    yStoreTest{k}(end-2) = 1;
end


for i = 1:length(xStoreTest)
    xStoreTest{i} = transpose(xStoreTest{i});
end

for i = 1:length(yStoreTest)
    yStoreTest{i} = transpose(yStoreTest{i});
    yStoreTest{i} = categorical(yStoreTest{i});
end
end