How can I apply filer for three signal using matlab
1 view (last 30 days)
I haver read three signals .Now I would like to apply filetring on the tree signals at a time using for Loop
Star Strider on 4 Aug 2022
If they all have the same sampling frequency and are the same lengths and the same filtering requirements, concatenate them as column vectors and filter them at the same time using filtfilt or bandpass (for example) or its friends:
signals = [signal1(:) signal2(:) signal3(:)];
signals_filt = bandpass(signals, [f_low f_high], Fs);
signals_filt = filtfilt(sos,g,signals);
No loops are necessary.
If they are not the same lengths or have different filters or other characteristics, then it will be necessary to ‘brute force’ the filtering:
signal1_filt = bandpass(signal1, [f_low1 f_high1], Fs1);
signal2_filt = bandpass(signal2, [f_low2 f_high2], Fs2);
signal3_filt = bandpass(signal3, [f_low3 f_high3], Fs3);
In this instance, a loop is likely not the most efficient option.
NOTE — rdmat.m is a Physionet file.