I’ ve looking for a method to filter each column of data (101X62) with specific cutoff (1X63). Please, could someone indicate me the problem? Thanks x=data fs=60; fc=cutoff; for idx = 1:numel(x); [b,a] = butter(2, fc/(fs/2)); y = filter(b,a,x); %// output end
John Williams answered .
2025-11-20
[rows, columns] = size(data); y = zeros(size(data)); fs = 60; for k = 1 : columns thisColumn = data(:, k); % Extract this one column fc = cutoff(k); % Extract this one cutoff value. % Determine filter parameters. [b,a] = butter(2, fc/(fs/2)); % Do the filtering, and put result into column k of the output y y(:,k) = filter(b, a, thisColumn); end