- Make sure that the length of your ECG signal is sufficient for the "gtcc" computation. If the signal is too short, it may not support the requested number of coefficients.
- Start with a smaller number and gradually increase it to find the maximum that your data can support.
- Verify that the sampling frequency (fs) is correctly set and appropriate for the ECG data. A mismatch in expected and actual sampling frequency can affect feature extraction.
- Ensure that the preprocessing step (bandpass filtering) does not excessively reduce the signal length or alter it in a way that affects the "gtcc" computation.
how can i lower the requested number of coefficient in gtcc?
조회 수: 5 (최근 30일)
이전 댓글 표시
i am trying to extract the feature using gtcc. Error is shown the in the command window. My fs is 1k, I need to lower the requested number of coefficients.
clear all close all clc
numfiles=1947;
Features=[];
fs=1000;
N = 4; % Order
Fc1 = 1; % First Cutoff Frequency
Fc2 = 100; % Second Cutoff Frequency
% Construct an FDESIGN object and call its BUTTER method.
h = fdesign.bandpass('N,F3dB1,F3dB2', N, Fc1, Fc2, fs);
Hd = design(h, 'butter');
for i=1:numfiles
% Data Loading
filename=sprintf('B(%d).mat',i);
ECG=importdata(filename);
%preprocessing
EECG=filter(Hd,ECG);
%Feature Extraction
GTCC = rms(gtcc(EECG,fs,'numcoeffs',4));
Feat=[GTCC];
Features=[Features;Feat];
disp(i)
end
댓글 수: 0
답변 (1개)
Vidhi Agarwal
2024년 11월 4일 5:47
When you're using the "gtcc" function for feature extraction and encounter an error related to the number of coefficients, it typically means that the requested number of coefficients ('numcoeffs') is too high for the given sampling frequency and signal length. Below are the ways you can follow that might help you out.
To understand more about "gtcc" function, refer to the following documentation:
Hope that helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!