function [mobility,complexity] = HjorthParameters(data)
 
i = length(data);
derivace = diff([0;data]);
druhaderivace = diff([0;derivace]);
mx2 = mean(data.^2);
mdx2 = mean(derivace.^2);
mddx2 = mean(druhaderivace.^2);

mob = mdx2 / mx2;
complexity = sqrt(mddx2 / mdx2 - mob);
mobility = sqrt(mob);

end

%funkce pro výpočet mobility a komplexity