?? makeentropyintervals.m
字號(hào):
function EntropyInt=makeEntropyIntervals(X,intervals)
% makeEntropyIntervals gives indices for entropy intervals based on std (Ralf Torgrip)
%
% Input:
% X is the independent variables
% intervals: the number of intervals wanted, e.g. 20
%
% Output:
% EntropyInt is a double array containing interval information for direct use with ipls
%
% Copyright, Chemometrics Group - KVL, Copenhagen, Denmark
% Lars N鴕gaard, March 2004
%
% EntropyInt=makeEntropyIntervals(X,intervals);
if nargin==0
disp(' ')
disp(' EntropyInt=makeEntropyIntervals(X,intervals);')
disp(' ')
return
end
deviations=std(X);
splitpoint=sum(deviations)/(intervals);
sumdev=cumsum(deviations);
EntropyInt=[];
for i=1:intervals
ix=find((i-1)*splitpoint<=sumdev & sumdev<=i*splitpoint);
EntropyInt=[EntropyInt ix(1) ix(end)];
end
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -