% Time domain feature extraction of data clc; close ; clear all; % Data import data=xlsread('E:\ Volleyball \ raw data z direction .xlsx',1)';
% Initial parameter setting [m,n]=size(data); D=[]; DA=[]; % Solving characteristics for i=1:1:m d=data(i,:)
d=d(~isnan(d));% remove NAN value ave=mean(d);% mean value u=std(d);% standard deviation time=length(d);% time
theta=var(d);% variance area=sum(abs(d));% the measure of area maxv=max(d);% Maximum minv=min(d);% minimum value
[dd,minp,maxp]=premnmx(d); % Solving information entropy entropy=yyshang(dd,9);% Information entropy
D=[D;ave;maxv;minv;u;area;time;theta;entropy]; DA=[DA,D]; D=[]; end DA=DA';
among yyshang It's a function of entropy , The code is as follows
function Hx=yyshang(y,duan) % Signal entropy in time domain without reference to original signal % input :maxf: The point with the largest energy in the energy spectrum of the original signal
%y: The sequence of information entropy to be solved %duan: The number of blocks to be partitioned in the sequence of information entropy to be calculated %Hx:y Information entropy of
%duan=10;% Press the sequence duan Bisection , If duan=10, The sequence is divided into 10 equal division x_min=min(y); x_max=max(y);
maxf(1)=abs(x_max-x_min); maxf(2)=x_min; duan_t=1.0/duan;
jiange=maxf(1)*duan_t; % for i=1:10 %
pnum(i)=length(find((y_p>=(i-1)*jiange)&(y_p<i*jiange))); % end
pnum(1)=length(find(y<maxf(2)+jiange)); for i=2:duan-1
pnum(i)=length(find((y>=maxf(2)+(i-1)*jiange)&(y<maxf(2)+i*jiange))); end
pnum(duan)=length(find(y>=maxf(2)+(duan-1)*jiange)); %sum(pnum)
ppnum=pnum/sum(pnum);% Probability of occurrence of each segment %sum(ppnum) Hx=0; for i=1:duan if ppnum(i)==0
Hi=0; else Hi=-ppnum(i)*log2(ppnum(i)); end Hx=Hx+Hi; end end





©2019-2020 Toolsou All rights reserved,
QT Delete directory and file Java aggregate ------LinkedHashMap Underlying principle I've been drinking soft water for three years ? What is the use of soft water and water softener Java Xiao Ming A+B About wechat payment body( Product description ) Problems encountered Digital rolling lottery program 3 species Python data structure ,13 Creation methods , This is the conclusion , Great ! Huawei Mate 40 Pro+ 5G exposure : Leica film lens , Ceramic body What's the difference in server prices ? Operators Website visitors' mobile phone number capture