Hos Bispectrum computation error

2 次查看(过去 30 天)
jaypal singh
jaypal singh 2021-1-28
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by