How to apply butterworth filter to a few columns in a table
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tomaszzz
am 18 Feb. 2022
Beantwortet: Mathieu NOE
am 18 Feb. 2022
I have a 600X10 table. I want to apply butterworth filter for columns from 4 till 9 using this which gives me error:
tab_pelvis = filtfilt(b,a,tab_pelvis(:,4:9));
Error using filtfilt (line 81)
Invalid data type. Arguments must be double matrices.
Can you help please ?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 18 Feb. 2022
Try something like this —
tab_pelvis = filtfilt(b,a,tab_pelvis{:,4:9});
Note the curly braces {}. This will reference the contents of the table rather than the table itself, which is what the parentheses () do here.
.
0 Kommentare
Weitere Antworten (1)
Mathieu NOE
am 18 Feb. 2022
hello
you can apply your filter on a numerical array , not a table , so convert it using table2array
tab_pelvis_array = table2array(tab_pelvis);
[b,a] = butter(2,0.2,'low'); % IIR filter design example
tab_pelvis_array_filtered = filtfilt(b,a,tab_pelvis_array(:,4:9));
0 Kommentare
Siehe auch
Kategorien
Mehr zu Filter Design finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!