function [priznaky]=casove_priznaky(sig,fvz)
% sig = AWWF(sig(1:10000), fvz,[0,0]);

typ='c';
znacky=rozmereni(sig,typ,fvz); %rozmereni signalu

vP=znacky{1,1}(1,:);
R=znacky{1,2}(1,:);
vT=znacky{1,3}(1,:);
zP=znacky{2,1}(1,:);
Q=znacky{2,2}(1,:);
kP=znacky{3,1}(1,:);
S=znacky{3,2}(1,:);
kT=znacky{3,3}(1,:);

%% vyrovnani delek
[vP,R,vT,zP,Q,kP,S,kT]=vyrovnaniDelek(vP,R,vT,zP,Q,kP,S,kT,fvz);
%% vypocet priznaku
hodnotyR=sig(R);
hodnotyP=sig(vP);
hodnotyT=sig(vT);
RPamp=hodnotyR-hodnotyP;
RPamp=outliers(RPamp);RPampS=std(RPamp)/mean(RPamp);RPamp=mean(RPamp);
RTamp=hodnotyR-hodnotyT;
RTamp=outliers(RTamp);RTampS=std(RTamp)/mean(RTamp);RTamp=mean(RTamp);

RR=diff(R);RR=[RR mean(RR)];
QR=R-Q;
QR=outliers(QR);QRs=std(QR)/mean(QR);QR=mean(QR);
RS=S-R;
RS=outliers(RS);RSs=std(RS)/mean(RS);RS=mean(RS);
RT=vT-R;
RT=outliers(RT);RTs=std(RT)/mean(RT);RT=mean(RT);
RTk=kT-R;
RTk=outliers(RTk);RTks=std(RTk)/mean(RTk);RTk=mean(RTk);
PR=R-vP;
PR=outliers(PR);PRs=std(PR)/mean(PR);PR=mean(PR);
PzR=R-zP;
PzR=outliers(PzR);PzRs=std(PzR)/mean(PzR);PzR=mean(PzR);
PkR=R-kP;
PkR=outliers(PkR);PkRs=std(PkR)/mean(PkR);PkR=mean(PkR);
lP=PzR-PkR;
PQ=PR-QR;
PzQ=PzR-QR;
PkQ=PkR-QR;
QTk=(QR+RTk)/sqrt(mean(RR));
STk=RTk-RS;
ST=RT-RS;
PT=PzR+RTk;

QR=QR/fvz;RS=RS/fvz;RT=RT/fvz;RTk=RTk/fvz;PR=PR/fvz;PzR=PzR/fvz;PkR=PkR/fvz;lP=lP/fvz;PQ=PQ/fvz;PzQ=PzQ/fvz;STk=STk/fvz;ST=ST/fvz;PT=PT/fvz; %prepocet ze vzorku na s
lP=lP/PT;PQ=PQ/PT;PzQ=PzQ/PT;STk=STk/PT;ST=ST/PT; %normalizace podle delky cyklu

priznaky=[QR,RS,RT,PR,PkR,lP,PQ,PzQ,PkQ,QTk,STk,ST,PT,RPamp,RTamp,PRs];
