An error in filtfilt
8 views (last 30 days)
Show older comments
load P01EC1
sig= P01EC1(:,:)';
sig is 4x30800 double
When I did like this:
subs_cd1_alpha=filtfilt(b,a,sig);
I’ve got this error:
Error using filtfilt>getCoeffsAndInitialConditions (line 228)
Data length must be larger than 18 samples.
Error in filtfilt>efiltfilt (line 129)
[b2,a2,zi,nfact,L] = getCoeffsAndInitialConditions(b,a,Npts);
Error in filtfilt (line 89)
y=efiltfilt(b,a,x);
Error in subject_01_EC1Ac (line 287)
subs_cd1_alpha=filtfilt(b,a,sig);
And
In this case:
for i=1:4
subs_cd1_alpha=filtfilt(b,a,sig(:,i));
end
This error happened:
Error using filtfilt>getCoeffsAndInitialConditions (line 228)
Data length must be larger than 18 samples.
Error in filtfilt>efiltfilt (line 129)
[b2,a2,zi,nfact,L] = getCoeffsAndInitialConditions(b,a,Npts);
Error in filtfilt (line 89)
y=efiltfilt(b,a,x);
Error in subject_01_EC1Ac (line 285)
subs_cd1_alpha=filtfilt(b,a,sig(:,i));
0 Comments
Accepted Answer
Bruno Luong
on 1 Oct 2022
Edited: Bruno Luong
on 1 Oct 2022
Don't tranpose your date if you want to filter along the long dimension
sig= P01EC1(:,:);
0 Comments
More Answers (0)
See Also
Categories
Find more on Digital Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!