Hos Bispectrum computation error

2 views (last 30 days)
jaypal singh
jaypal singh on 28 Jan 2021
Dear Friends;
I am computing HOS Bi-spectrum feature for Row x Colume (1x1000 ) of ECG signal. I am geeting 1x45 as a feature in ans. I am confusing what represents 45 column in ans. The code for HOS Bi-spectrum is belowed:
function [features, featuresName, map] = signal_hosBispectrum(signal, options, varargin)
if isempty(options)
options.maxlag = 8;
options.sampleSeg = 32;
options.overlap = 50;
options.nfft = 64;
options.wind = 1;
options.pt2 = 40;
end
cmat1 = [];
cum3_principal_domain = [];
cmat1 = bispeci(signal, options.maxlag, options.sampleSeg, options.overlap, 'biased', options.nfft, options.wind);
sizeCmat1 = size(cmat1, 2);
half = round((sizeCmat1/2));
for ii=half:options.pt2 % Manually set
for jj=half:ii,
cum3_principal_domain = [cum3_principal_domain, abs(cmat1(ii, jj))];
end
end
hos = cum3_principal_domain;
if length(varargin)==1
headerTxt = [varargin{1}, '_'];
else
headerTxt = '';
end
for h=1:size(hos, 2)
headers(:, h) = {[headerTxt, 'HOS_Bispectrums', num2str(h)]};
end
map = abs(cmat1);
featuresName = headers;
features = hos;
end

Answers (0)

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!