求信息熵matlab程序!!!
本帖最后由 牛小贱 于 2014-2-28 11:10 编辑哪位大侠有关于信息熵的matlab 程序,让俺参考一下呗!!急,急!!!!包括奇异谱商、功率谱熵、小波空间特征谱商和小波能谱商。请各位大侠把相关的程序发到我的邮箱:feic544@163.com.谢谢啦!! 根据公式自己先编程试试
回复 楼主 wy558558558 的帖子
你好!我这有本书你参考一下! 给我也发一份谢谢!ye_zi204@163.com 能不能把那本书也发给我呀,救急啊...谢谢啦{:{19}:} 我也需要,定重谢!!!!邮箱hcdhuang2008@163.com 能不能把那本书的名称和作者留一下。。。。{:{20}:} 书的名字能说吗? 楼主麻烦问下你这程序搞定了吗? 也给我发一下吧,谢谢! 同求啊,我想问hilbert谱熵的求解 可以参考下面的函数function =entropy(x,descriptor,approach,base)
%ENTROPY Estimates the entropy of stationary signals with
% independent samples using various approaches.
% = ENTROPY(X) or
% = ENTROPY(X,DESCRIPTOR) or
% = ENTROPY(X,DESCRIPTOR,APPROACH) or
% = ENTROPY(X,DESCRIPTOR,APPROACH,BASE)
%
% ESTIMATE : The entropy estimate
% NBIAS : The N-bias of the estimate
% SIGMA : The standard error of the estimate
% DESCRIPTOR: The descriptor of the histogram, seel alse ENTROPY
%
% X : The time series to be analyzed, a row vector
% DESCRIPTOR: Where DESCRIPTOR=
% LOWERBOUND: Lowerbound of the histogram
% UPPERBOUND: Upperbound of the histogram
% NCELL : The number of cells of the histogram
% APPROACH : The method used, one of the following ones:
% 'unbiased': The unbiased estimate (default)
% 'mmse' : The minimum mean square error estimate
% 'biased': The biased estimate
% BASE : The base of the logarithm; default e
%
% See also: http://www.cs.rug.nl/~rudy/matlab/
% R. Moddemeijer
% Copyright (c) by R. Moddemeijer
% $Revision: 1.1 $$Date: 2001/02/05 08:59:36 $
if nargin <1
disp('Usage: = ENTROPY(X)')
disp(' = ENTROPY(X,DESCRIPTOR)')
disp(' = ENTROPY(X,DESCRIPTOR,APPROACH)')
disp(' = ENTROPY(X,DESCRIPTOR,APPROACH,BASE)')
disp('Where: DESCRIPTOR = ')
return
end
% Some initial tests on the input arguments
=size(x);
if NRowX~=1
error('Invalid dimension of X');
end;
if nargin>4
error('Too many arguments');
end;
if nargin==1
=histogram(x);
end;
if nargin>=2
=histogram(x,descriptor);
end;
if nargin<3
approach='unbiased';
end;
if nargin<4
base=exp(1);
end;
lowerbound=descriptor(1);
upperbound=descriptor(2);
ncell=descriptor(3);
estimate=0;
sigma=0;
count=0;
for n=1:ncell
if h(n)~=0
logf=log(h(n));
else
logf=0;
end;
count=count+h(n);
estimate=estimate-h(n)*logf;
sigma=sigma+h(n)*logf^2;
end;
% biased estimate
estimate=estimate/count;
sigma =sqrt( (sigma/count-estimate^2)/(count-1) );
estimate=estimate+log(count)+log((upperbound-lowerbound)/ncell);
nbias =-(ncell-1)/(2*count);
% conversion to unbiased estimate
if approach(1)=='u'
estimate=estimate-nbias;
nbias=0;
end;
% conversion to minimum mse estimate
if approach(1)=='m'
estimate=estimate-nbias;
nbias=0;
lambda=estimate^2/(estimate^2+sigma^2);
nbias =(1-lambda)*estimate;
estimate=lambda*estimate;
sigma =lambda*sigma;
end;
% base transformation
estimate=estimate/log(base);
nbias =nbias /log(base);
sigma =sigma /log(base);
12楼的很有参考价值啊!谢谢,打算用hht后求能量熵分辨故障点,谢谢! 楼主能不能也给我发一下,万分感谢!sylvia1987@qq.com {:{10}:}{:{10}:}{:{10}:}{:{10}:}
页:
[1]
2