In the operation of filtfilt, does the filtering process occur in the row direction or the column direction?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sho
el 16 de Ag. de 2023
Comentada: Sho
el 16 de Ag. de 2023
I have a question regarding the direction in which filtfilt operates. Time series data is stored for each column, such as in data.mat. I am considering filtering this data separately for each column. My question has two parts:
- In the operation of filtfilt, does the filtering process occur in the row direction or the column direction?
- If it operates in the row direction, is there a way to make it operate in the column direction?
I appreciate your response.
load data.mat
sampling_rate = 200;
cutoff_frequency = 12;
filter_order = 4;
[b, a] = butter(filter_order, cutoff_frequency / (0.5.*sampling_rate), 'low');
filt_data = [data(:,1:2) filtfilt(b, a, data(:,3:end))]
0 comentarios
Respuesta aceptada
the cyclist
el 16 de Ag. de 2023
Editada: the cyclist
el 16 de Ag. de 2023
"The function operates along the first array dimension of x unless x is a row vector. If x is a row vector, then the function operates along the second dimension."
"First array dimension" means down the columns.
2 comentarios
Walter Roberson
el 16 de Ag. de 2023
And there is no option to filter along rows when the data is not a row vector. If you need to do that, then transpose, .' or permute before filtfilt and convert back afterwards.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!